diff --git a/api-list.json b/api-list.json index 2b2064b3336..8e07ec3de5c 100644 --- a/api-list.json +++ b/api-list.json @@ -47,6 +47,36 @@ "documentationLink": "https://cloud.google.com/assured-workloads/access-approval/docs", "preferred": true }, + { + "kind": "discovery#directoryItem", + "id": "accesscontextmanager:v1beta", + "name": "accesscontextmanager", + "version": "v1beta", + "title": "Access Context Manager API", + "description": "An API for setting attribute based access control to requests to Google Cloud services.", + "discoveryRestUrl": "https://accesscontextmanager.googleapis.com/$discovery/rest?version=v1beta", + "icons": { + "x16": "https://www.gstatic.com/images/branding/product/1x/googleg_16dp.png", + "x32": "https://www.gstatic.com/images/branding/product/1x/googleg_32dp.png" + }, + "documentationLink": "https://cloud.google.com/access-context-manager/docs/reference/rest/", + "preferred": false + }, + { + "kind": "discovery#directoryItem", + "id": "accesscontextmanager:v1", + "name": "accesscontextmanager", + "version": "v1", + "title": "Access Context Manager API", + "description": "An API for setting attribute based access control to requests to Google Cloud services.", + "discoveryRestUrl": "https://accesscontextmanager.googleapis.com/$discovery/rest?version=v1", + "icons": { + "x16": "https://www.gstatic.com/images/branding/product/1x/googleg_16dp.png", + "x32": "https://www.gstatic.com/images/branding/product/1x/googleg_32dp.png" + }, + "documentationLink": "https://cloud.google.com/access-context-manager/docs/reference/rest/", + "preferred": true + }, { "kind": "discovery#directoryItem", "id": "acmedns:v1", diff --git a/artifactregistry/v1/artifactregistry-api.json b/artifactregistry/v1/artifactregistry-api.json index 218eeb6cada..8fb19105fce 100644 --- a/artifactregistry/v1/artifactregistry-api.json +++ b/artifactregistry/v1/artifactregistry-api.json @@ -1257,7 +1257,7 @@ "type": "string" }, "parent": { - "description": "The name of the parent resource whose tags will be listed.", + "description": "The name of the parent package whose tags will be listed. Example: \"projects/p1/locations/us-central1/repositories/repo1/packages/pkg1", "location": "path", "pattern": "^projects/[^/]+/locations/[^/]+/repositories/[^/]+/packages/[^/]+$", "required": true, @@ -1589,7 +1589,7 @@ } } }, - "revision": "20230508", + "revision": "20230512", "rootUrl": "https://artifactregistry.googleapis.com/", "schemas": { "AptArtifact": { diff --git a/artifactregistry/v1/artifactregistry-gen.go b/artifactregistry/v1/artifactregistry-gen.go index a48b42ab09f..7bb87761523 100644 --- a/artifactregistry/v1/artifactregistry-gen.go +++ b/artifactregistry/v1/artifactregistry-gen.go @@ -8763,7 +8763,9 @@ type ProjectsLocationsRepositoriesPackagesTagsListCall struct { // List: Lists tags. // -// - parent: The name of the parent resource whose tags will be listed. +// - parent: The name of the parent package whose tags will be listed. +// Example: +// "projects/p1/locations/us-central1/repositories/repo1/packages/pkg1. func (r *ProjectsLocationsRepositoriesPackagesTagsService) List(parent string) *ProjectsLocationsRepositoriesPackagesTagsListCall { c := &ProjectsLocationsRepositoriesPackagesTagsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.parent = parent @@ -8920,7 +8922,7 @@ func (c *ProjectsLocationsRepositoriesPackagesTagsListCall) Do(opts ...googleapi // "type": "string" // }, // "parent": { - // "description": "The name of the parent resource whose tags will be listed.", + // "description": "The name of the parent package whose tags will be listed. Example: \"projects/p1/locations/us-central1/repositories/repo1/packages/pkg1", // "location": "path", // "pattern": "^projects/[^/]+/locations/[^/]+/repositories/[^/]+/packages/[^/]+$", // "required": true, diff --git a/artifactregistry/v1beta1/artifactregistry-api.json b/artifactregistry/v1beta1/artifactregistry-api.json index 2c5bbe09698..6e741d9d627 100644 --- a/artifactregistry/v1beta1/artifactregistry-api.json +++ b/artifactregistry/v1beta1/artifactregistry-api.json @@ -736,7 +736,7 @@ "type": "string" }, "parent": { - "description": "The name of the parent resource whose tags will be listed.", + "description": "The name of the parent package whose tags will be listed. Example: \"projects/p1/locations/us-central1/repositories/repo1/packages/pkg1", "location": "path", "pattern": "^projects/[^/]+/locations/[^/]+/repositories/[^/]+/packages/[^/]+$", "required": true, @@ -929,7 +929,7 @@ } } }, - "revision": "20230508", + "revision": "20230512", "rootUrl": "https://artifactregistry.googleapis.com/", "schemas": { "Binding": { diff --git a/artifactregistry/v1beta1/artifactregistry-gen.go b/artifactregistry/v1beta1/artifactregistry-gen.go index b6405656b44..20801e96c60 100644 --- a/artifactregistry/v1beta1/artifactregistry-gen.go +++ b/artifactregistry/v1beta1/artifactregistry-gen.go @@ -4314,7 +4314,9 @@ type ProjectsLocationsRepositoriesPackagesTagsListCall struct { // List: Lists tags. // -// - parent: The name of the parent resource whose tags will be listed. +// - parent: The name of the parent package whose tags will be listed. +// Example: +// "projects/p1/locations/us-central1/repositories/repo1/packages/pkg1. func (r *ProjectsLocationsRepositoriesPackagesTagsService) List(parent string) *ProjectsLocationsRepositoriesPackagesTagsListCall { c := &ProjectsLocationsRepositoriesPackagesTagsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.parent = parent @@ -4471,7 +4473,7 @@ func (c *ProjectsLocationsRepositoriesPackagesTagsListCall) Do(opts ...googleapi // "type": "string" // }, // "parent": { - // "description": "The name of the parent resource whose tags will be listed.", + // "description": "The name of the parent package whose tags will be listed. Example: \"projects/p1/locations/us-central1/repositories/repo1/packages/pkg1", // "location": "path", // "pattern": "^projects/[^/]+/locations/[^/]+/repositories/[^/]+/packages/[^/]+$", // "required": true, diff --git a/artifactregistry/v1beta2/artifactregistry-api.json b/artifactregistry/v1beta2/artifactregistry-api.json index 9a4aa0fa504..52773d6befe 100644 --- a/artifactregistry/v1beta2/artifactregistry-api.json +++ b/artifactregistry/v1beta2/artifactregistry-api.json @@ -870,7 +870,7 @@ "type": "string" }, "parent": { - "description": "The name of the parent resource whose tags will be listed.", + "description": "The name of the parent package whose tags will be listed. Example: \"projects/p1/locations/us-central1/repositories/repo1/packages/pkg1", "location": "path", "pattern": "^projects/[^/]+/locations/[^/]+/repositories/[^/]+/packages/[^/]+$", "required": true, @@ -1135,7 +1135,7 @@ } } }, - "revision": "20230508", + "revision": "20230512", "rootUrl": "https://artifactregistry.googleapis.com/", "schemas": { "AptArtifact": { diff --git a/artifactregistry/v1beta2/artifactregistry-gen.go b/artifactregistry/v1beta2/artifactregistry-gen.go index d410a28e71d..ac8cea1d63d 100644 --- a/artifactregistry/v1beta2/artifactregistry-gen.go +++ b/artifactregistry/v1beta2/artifactregistry-gen.go @@ -5626,7 +5626,9 @@ type ProjectsLocationsRepositoriesPackagesTagsListCall struct { // List: Lists tags. // -// - parent: The name of the parent resource whose tags will be listed. +// - parent: The name of the parent package whose tags will be listed. +// Example: +// "projects/p1/locations/us-central1/repositories/repo1/packages/pkg1. func (r *ProjectsLocationsRepositoriesPackagesTagsService) List(parent string) *ProjectsLocationsRepositoriesPackagesTagsListCall { c := &ProjectsLocationsRepositoriesPackagesTagsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.parent = parent @@ -5783,7 +5785,7 @@ func (c *ProjectsLocationsRepositoriesPackagesTagsListCall) Do(opts ...googleapi // "type": "string" // }, // "parent": { - // "description": "The name of the parent resource whose tags will be listed.", + // "description": "The name of the parent package whose tags will be listed. Example: \"projects/p1/locations/us-central1/repositories/repo1/packages/pkg1", // "location": "path", // "pattern": "^projects/[^/]+/locations/[^/]+/repositories/[^/]+/packages/[^/]+$", // "required": true, diff --git a/batch/v1/batch-api.json b/batch/v1/batch-api.json index e1284bd3780..10d2a25be6e 100644 --- a/batch/v1/batch-api.json +++ b/batch/v1/batch-api.json @@ -556,7 +556,7 @@ } } }, - "revision": "20230426", + "revision": "20230509", "rootUrl": "https://batch.googleapis.com/", "schemas": { "Accelerator": { @@ -1854,7 +1854,7 @@ "type": "object" }, "TaskGroup": { - "description": "A TaskGroup contains one or multiple Tasks that share the same Runnable but with different runtime parameters.", + "description": "A TaskGroup defines one or more Tasks that all share the same TaskSpec.", "id": "TaskGroup", "properties": { "name": { @@ -1875,6 +1875,20 @@ "description": "When true, Batch will populate a file with a list of all VMs assigned to the TaskGroup and set the BATCH_HOSTS_FILE environment variable to the path of that file. Defaults to false.", "type": "boolean" }, + "schedulingPolicy": { + "description": "Scheduling policy for Tasks in the TaskGroup. The default value is AS_SOON_AS_POSSIBLE.", + "enum": [ + "SCHEDULING_POLICY_UNSPECIFIED", + "AS_SOON_AS_POSSIBLE", + "IN_ORDER" + ], + "enumDescriptions": [ + "Unspecified.", + "Run Tasks as soon as resources are available. Tasks might be executed in parallel depending on parallelism and task_count values.", + "Run Tasks sequentially with increased task index." + ], + "type": "string" + }, "taskCount": { "description": "Number of Tasks in the TaskGroup. Default is 1.", "format": "int64", @@ -1886,7 +1900,7 @@ "type": "string" }, "taskEnvironments": { - "description": "An array of environment variable mappings, which are passed to Tasks with matching indices. If task_environments is used then task_count should not be specified in the request (and will be ignored). Task count will be the length of task_environments. Tasks get a BATCH_TASK_INDEX and BATCH_TASK_COUNT environment variable, in addition to any environment variables set in task_environments, specifying the number of Tasks in the Task's parent TaskGroup, and the specific Task's index in the TaskGroup (0 through BATCH_TASK_COUNT - 1). task_environments supports up to 200 entries.", + "description": "An array of environment variable mappings, which are passed to Tasks with matching indices. If task_environments is used then task_count should not be specified in the request (and will be ignored). Task count will be the length of task_environments. Tasks get a BATCH_TASK_INDEX and BATCH_TASK_COUNT environment variable, in addition to any environment variables set in task_environments, specifying the number of Tasks in the Task's parent TaskGroup, and the specific Task's index in the TaskGroup (0 through BATCH_TASK_COUNT - 1).", "items": { "$ref": "Environment" }, diff --git a/batch/v1/batch-gen.go b/batch/v1/batch-gen.go index 5ed8ba5ac26..83ba298babd 100644 --- a/batch/v1/batch-gen.go +++ b/batch/v1/batch-gen.go @@ -2268,8 +2268,8 @@ func (s *TaskExecution) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// TaskGroup: A TaskGroup contains one or multiple Tasks that share the -// same Runnable but with different runtime parameters. +// TaskGroup: A TaskGroup defines one or more Tasks that all share the +// same TaskSpec. type TaskGroup struct { // Name: Output only. TaskGroup name. The system generates this field // based on parent Job name. For example: @@ -2291,6 +2291,17 @@ type TaskGroup struct { // environment variable to the path of that file. Defaults to false. RequireHostsFile bool `json:"requireHostsFile,omitempty"` + // SchedulingPolicy: Scheduling policy for Tasks in the TaskGroup. The + // default value is AS_SOON_AS_POSSIBLE. + // + // Possible values: + // "SCHEDULING_POLICY_UNSPECIFIED" - Unspecified. + // "AS_SOON_AS_POSSIBLE" - Run Tasks as soon as resources are + // available. Tasks might be executed in parallel depending on + // parallelism and task_count values. + // "IN_ORDER" - Run Tasks sequentially with increased task index. + SchedulingPolicy string `json:"schedulingPolicy,omitempty"` + // TaskCount: Number of Tasks in the TaskGroup. Default is 1. TaskCount int64 `json:"taskCount,omitempty,string"` @@ -2307,8 +2318,7 @@ type TaskGroup struct { // variable, in addition to any environment variables set in // task_environments, specifying the number of Tasks in the Task's // parent TaskGroup, and the specific Task's index in the TaskGroup (0 - // through BATCH_TASK_COUNT - 1). task_environments supports up to 200 - // entries. + // through BATCH_TASK_COUNT - 1). TaskEnvironments []*Environment `json:"taskEnvironments,omitempty"` // TaskSpec: Required. Tasks in the group share the same task spec. diff --git a/beyondcorp/v1/beyondcorp-api.json b/beyondcorp/v1/beyondcorp-api.json index 37d92300c28..1d7b3f1e6b7 100644 --- a/beyondcorp/v1/beyondcorp-api.json +++ b/beyondcorp/v1/beyondcorp-api.json @@ -111,13 +111,13 @@ "resources": { "global": { "resources": { - "tenants": { + "partnerTenants": { "methods": { "getIamPolicy": { "description": "Gets the access control policy for a resource. Returns an empty policy if the resource exists and does not have a policy set.", - "flatPath": "v1/organizations/{organizationsId}/locations/global/tenants/{tenantsId}:getIamPolicy", + "flatPath": "v1/organizations/{organizationsId}/locations/global/partnerTenants/{partnerTenantsId}:getIamPolicy", "httpMethod": "GET", - "id": "beyondcorp.organizations.locations.global.tenants.getIamPolicy", + "id": "beyondcorp.organizations.locations.global.partnerTenants.getIamPolicy", "parameterOrder": [ "resource" ], @@ -131,7 +131,7 @@ "resource": { "description": "REQUIRED: The resource for which the policy is being requested. See [Resource names](https://cloud.google.com/apis/design/resource_names) for the appropriate value for this field.", "location": "path", - "pattern": "^organizations/[^/]+/locations/global/tenants/[^/]+$", + "pattern": "^organizations/[^/]+/locations/global/partnerTenants/[^/]+$", "required": true, "type": "string" } @@ -146,9 +146,9 @@ }, "setIamPolicy": { "description": "Sets the access control policy on the specified resource. Replaces any existing policy. Can return `NOT_FOUND`, `INVALID_ARGUMENT`, and `PERMISSION_DENIED` errors.", - "flatPath": "v1/organizations/{organizationsId}/locations/global/tenants/{tenantsId}:setIamPolicy", + "flatPath": "v1/organizations/{organizationsId}/locations/global/partnerTenants/{partnerTenantsId}:setIamPolicy", "httpMethod": "POST", - "id": "beyondcorp.organizations.locations.global.tenants.setIamPolicy", + "id": "beyondcorp.organizations.locations.global.partnerTenants.setIamPolicy", "parameterOrder": [ "resource" ], @@ -156,7 +156,7 @@ "resource": { "description": "REQUIRED: The resource for which the policy is being specified. See [Resource names](https://cloud.google.com/apis/design/resource_names) for the appropriate value for this field.", "location": "path", - "pattern": "^organizations/[^/]+/locations/global/tenants/[^/]+$", + "pattern": "^organizations/[^/]+/locations/global/partnerTenants/[^/]+$", "required": true, "type": "string" } @@ -174,9 +174,9 @@ }, "testIamPermissions": { "description": "Returns permissions that a caller has on the specified resource. If the resource does not exist, this will return an empty set of permissions, not a `NOT_FOUND` error. Note: This operation is designed to be used for building permission-aware UIs and command-line tools, not for authorization checking. This operation may \"fail open\" without warning.", - "flatPath": "v1/organizations/{organizationsId}/locations/global/tenants/{tenantsId}:testIamPermissions", + "flatPath": "v1/organizations/{organizationsId}/locations/global/partnerTenants/{partnerTenantsId}:testIamPermissions", "httpMethod": "POST", - "id": "beyondcorp.organizations.locations.global.tenants.testIamPermissions", + "id": "beyondcorp.organizations.locations.global.partnerTenants.testIamPermissions", "parameterOrder": [ "resource" ], @@ -184,7 +184,7 @@ "resource": { "description": "REQUIRED: The resource for which the policy detail is being requested. See [Resource names](https://cloud.google.com/apis/design/resource_names) for the appropriate value for this field.", "location": "path", - "pattern": "^organizations/[^/]+/locations/global/tenants/[^/]+$", + "pattern": "^organizations/[^/]+/locations/global/partnerTenants/[^/]+$", "required": true, "type": "string" } @@ -206,9 +206,9 @@ "methods": { "getIamPolicy": { "description": "Gets the access control policy for a resource. Returns an empty policy if the resource exists and does not have a policy set.", - "flatPath": "v1/organizations/{organizationsId}/locations/global/tenants/{tenantsId}/proxyConfigs/{proxyConfigsId}:getIamPolicy", + "flatPath": "v1/organizations/{organizationsId}/locations/global/partnerTenants/{partnerTenantsId}/proxyConfigs/{proxyConfigsId}:getIamPolicy", "httpMethod": "GET", - "id": "beyondcorp.organizations.locations.global.tenants.proxyConfigs.getIamPolicy", + "id": "beyondcorp.organizations.locations.global.partnerTenants.proxyConfigs.getIamPolicy", "parameterOrder": [ "resource" ], @@ -222,7 +222,7 @@ "resource": { "description": "REQUIRED: The resource for which the policy is being requested. See [Resource names](https://cloud.google.com/apis/design/resource_names) for the appropriate value for this field.", "location": "path", - "pattern": "^organizations/[^/]+/locations/global/tenants/[^/]+/proxyConfigs/[^/]+$", + "pattern": "^organizations/[^/]+/locations/global/partnerTenants/[^/]+/proxyConfigs/[^/]+$", "required": true, "type": "string" } @@ -237,9 +237,9 @@ }, "setIamPolicy": { "description": "Sets the access control policy on the specified resource. Replaces any existing policy. Can return `NOT_FOUND`, `INVALID_ARGUMENT`, and `PERMISSION_DENIED` errors.", - "flatPath": "v1/organizations/{organizationsId}/locations/global/tenants/{tenantsId}/proxyConfigs/{proxyConfigsId}:setIamPolicy", + "flatPath": "v1/organizations/{organizationsId}/locations/global/partnerTenants/{partnerTenantsId}/proxyConfigs/{proxyConfigsId}:setIamPolicy", "httpMethod": "POST", - "id": "beyondcorp.organizations.locations.global.tenants.proxyConfigs.setIamPolicy", + "id": "beyondcorp.organizations.locations.global.partnerTenants.proxyConfigs.setIamPolicy", "parameterOrder": [ "resource" ], @@ -247,7 +247,7 @@ "resource": { "description": "REQUIRED: The resource for which the policy is being specified. See [Resource names](https://cloud.google.com/apis/design/resource_names) for the appropriate value for this field.", "location": "path", - "pattern": "^organizations/[^/]+/locations/global/tenants/[^/]+/proxyConfigs/[^/]+$", + "pattern": "^organizations/[^/]+/locations/global/partnerTenants/[^/]+/proxyConfigs/[^/]+$", "required": true, "type": "string" } @@ -265,9 +265,9 @@ }, "testIamPermissions": { "description": "Returns permissions that a caller has on the specified resource. If the resource does not exist, this will return an empty set of permissions, not a `NOT_FOUND` error. Note: This operation is designed to be used for building permission-aware UIs and command-line tools, not for authorization checking. This operation may \"fail open\" without warning.", - "flatPath": "v1/organizations/{organizationsId}/locations/global/tenants/{tenantsId}/proxyConfigs/{proxyConfigsId}:testIamPermissions", + "flatPath": "v1/organizations/{organizationsId}/locations/global/partnerTenants/{partnerTenantsId}/proxyConfigs/{proxyConfigsId}:testIamPermissions", "httpMethod": "POST", - "id": "beyondcorp.organizations.locations.global.tenants.proxyConfigs.testIamPermissions", + "id": "beyondcorp.organizations.locations.global.partnerTenants.proxyConfigs.testIamPermissions", "parameterOrder": [ "resource" ], @@ -275,7 +275,7 @@ "resource": { "description": "REQUIRED: The resource for which the policy detail is being requested. See [Resource names](https://cloud.google.com/apis/design/resource_names) for the appropriate value for this field.", "location": "path", - "pattern": "^organizations/[^/]+/locations/global/tenants/[^/]+/proxyConfigs/[^/]+$", + "pattern": "^organizations/[^/]+/locations/global/partnerTenants/[^/]+/proxyConfigs/[^/]+$", "required": true, "type": "string" } @@ -1590,7 +1590,7 @@ } } }, - "revision": "20230501", + "revision": "20230509", "rootUrl": "https://beyondcorp.googleapis.com/", "schemas": { "AllocatedConnection": { diff --git a/beyondcorp/v1/beyondcorp-gen.go b/beyondcorp/v1/beyondcorp-gen.go index 38c37ff8d10..9b0b99d4174 100644 --- a/beyondcorp/v1/beyondcorp-gen.go +++ b/beyondcorp/v1/beyondcorp-gen.go @@ -167,34 +167,34 @@ type OrganizationsLocationsService struct { func NewOrganizationsLocationsGlobalService(s *Service) *OrganizationsLocationsGlobalService { rs := &OrganizationsLocationsGlobalService{s: s} - rs.Tenants = NewOrganizationsLocationsGlobalTenantsService(s) + rs.PartnerTenants = NewOrganizationsLocationsGlobalPartnerTenantsService(s) return rs } type OrganizationsLocationsGlobalService struct { s *Service - Tenants *OrganizationsLocationsGlobalTenantsService + PartnerTenants *OrganizationsLocationsGlobalPartnerTenantsService } -func NewOrganizationsLocationsGlobalTenantsService(s *Service) *OrganizationsLocationsGlobalTenantsService { - rs := &OrganizationsLocationsGlobalTenantsService{s: s} - rs.ProxyConfigs = NewOrganizationsLocationsGlobalTenantsProxyConfigsService(s) +func NewOrganizationsLocationsGlobalPartnerTenantsService(s *Service) *OrganizationsLocationsGlobalPartnerTenantsService { + rs := &OrganizationsLocationsGlobalPartnerTenantsService{s: s} + rs.ProxyConfigs = NewOrganizationsLocationsGlobalPartnerTenantsProxyConfigsService(s) return rs } -type OrganizationsLocationsGlobalTenantsService struct { +type OrganizationsLocationsGlobalPartnerTenantsService struct { s *Service - ProxyConfigs *OrganizationsLocationsGlobalTenantsProxyConfigsService + ProxyConfigs *OrganizationsLocationsGlobalPartnerTenantsProxyConfigsService } -func NewOrganizationsLocationsGlobalTenantsProxyConfigsService(s *Service) *OrganizationsLocationsGlobalTenantsProxyConfigsService { - rs := &OrganizationsLocationsGlobalTenantsProxyConfigsService{s: s} +func NewOrganizationsLocationsGlobalPartnerTenantsProxyConfigsService(s *Service) *OrganizationsLocationsGlobalPartnerTenantsProxyConfigsService { + rs := &OrganizationsLocationsGlobalPartnerTenantsProxyConfigsService{s: s} return rs } -type OrganizationsLocationsGlobalTenantsProxyConfigsService struct { +type OrganizationsLocationsGlobalPartnerTenantsProxyConfigsService struct { s *Service } @@ -2872,9 +2872,9 @@ func (s *Tunnelv1ProtoTunnelerInfo) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// method id "beyondcorp.organizations.locations.global.tenants.getIamPolicy": +// method id "beyondcorp.organizations.locations.global.partnerTenants.getIamPolicy": -type OrganizationsLocationsGlobalTenantsGetIamPolicyCall struct { +type OrganizationsLocationsGlobalPartnerTenantsGetIamPolicyCall struct { s *Service resource string urlParams_ gensupport.URLParams @@ -2891,8 +2891,8 @@ type OrganizationsLocationsGlobalTenantsGetIamPolicyCall struct { // requested. See Resource names // (https://cloud.google.com/apis/design/resource_names) for the // appropriate value for this field. -func (r *OrganizationsLocationsGlobalTenantsService) GetIamPolicy(resource string) *OrganizationsLocationsGlobalTenantsGetIamPolicyCall { - c := &OrganizationsLocationsGlobalTenantsGetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)} +func (r *OrganizationsLocationsGlobalPartnerTenantsService) GetIamPolicy(resource string) *OrganizationsLocationsGlobalPartnerTenantsGetIamPolicyCall { + c := &OrganizationsLocationsGlobalPartnerTenantsGetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.resource = resource return c } @@ -2910,7 +2910,7 @@ func (r *OrganizationsLocationsGlobalTenantsService) GetIamPolicy(resource strin // which resources support conditions in their IAM policies, see the IAM // documentation // (https://cloud.google.com/iam/help/conditions/resource-policies). -func (c *OrganizationsLocationsGlobalTenantsGetIamPolicyCall) OptionsRequestedPolicyVersion(optionsRequestedPolicyVersion int64) *OrganizationsLocationsGlobalTenantsGetIamPolicyCall { +func (c *OrganizationsLocationsGlobalPartnerTenantsGetIamPolicyCall) OptionsRequestedPolicyVersion(optionsRequestedPolicyVersion int64) *OrganizationsLocationsGlobalPartnerTenantsGetIamPolicyCall { c.urlParams_.Set("options.requestedPolicyVersion", fmt.Sprint(optionsRequestedPolicyVersion)) return c } @@ -2918,7 +2918,7 @@ func (c *OrganizationsLocationsGlobalTenantsGetIamPolicyCall) OptionsRequestedPo // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *OrganizationsLocationsGlobalTenantsGetIamPolicyCall) Fields(s ...googleapi.Field) *OrganizationsLocationsGlobalTenantsGetIamPolicyCall { +func (c *OrganizationsLocationsGlobalPartnerTenantsGetIamPolicyCall) Fields(s ...googleapi.Field) *OrganizationsLocationsGlobalPartnerTenantsGetIamPolicyCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -2928,7 +2928,7 @@ func (c *OrganizationsLocationsGlobalTenantsGetIamPolicyCall) Fields(s ...google // getting updates only after the object has changed since the last // request. Use googleapi.IsNotModified to check whether the response // error from Do is the result of In-None-Match. -func (c *OrganizationsLocationsGlobalTenantsGetIamPolicyCall) IfNoneMatch(entityTag string) *OrganizationsLocationsGlobalTenantsGetIamPolicyCall { +func (c *OrganizationsLocationsGlobalPartnerTenantsGetIamPolicyCall) IfNoneMatch(entityTag string) *OrganizationsLocationsGlobalPartnerTenantsGetIamPolicyCall { c.ifNoneMatch_ = entityTag return c } @@ -2936,21 +2936,21 @@ func (c *OrganizationsLocationsGlobalTenantsGetIamPolicyCall) IfNoneMatch(entity // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *OrganizationsLocationsGlobalTenantsGetIamPolicyCall) Context(ctx context.Context) *OrganizationsLocationsGlobalTenantsGetIamPolicyCall { +func (c *OrganizationsLocationsGlobalPartnerTenantsGetIamPolicyCall) Context(ctx context.Context) *OrganizationsLocationsGlobalPartnerTenantsGetIamPolicyCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *OrganizationsLocationsGlobalTenantsGetIamPolicyCall) Header() http.Header { +func (c *OrganizationsLocationsGlobalPartnerTenantsGetIamPolicyCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *OrganizationsLocationsGlobalTenantsGetIamPolicyCall) doRequest(alt string) (*http.Response, error) { +func (c *OrganizationsLocationsGlobalPartnerTenantsGetIamPolicyCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { @@ -2976,14 +2976,14 @@ func (c *OrganizationsLocationsGlobalTenantsGetIamPolicyCall) doRequest(alt stri return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "beyondcorp.organizations.locations.global.tenants.getIamPolicy" call. +// Do executes the "beyondcorp.organizations.locations.global.partnerTenants.getIamPolicy" call. // Exactly one of *GoogleIamV1Policy or error will be non-nil. Any // non-2xx status code is an error. Response headers are in either // *GoogleIamV1Policy.ServerResponse.Header or (if a response was // returned at all) in error.(*googleapi.Error).Header. Use // googleapi.IsNotModified to check whether the returned error was // because http.StatusNotModified was returned. -func (c *OrganizationsLocationsGlobalTenantsGetIamPolicyCall) Do(opts ...googleapi.CallOption) (*GoogleIamV1Policy, error) { +func (c *OrganizationsLocationsGlobalPartnerTenantsGetIamPolicyCall) Do(opts ...googleapi.CallOption) (*GoogleIamV1Policy, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -3015,9 +3015,9 @@ func (c *OrganizationsLocationsGlobalTenantsGetIamPolicyCall) Do(opts ...googlea return ret, nil // { // "description": "Gets the access control policy for a resource. Returns an empty policy if the resource exists and does not have a policy set.", - // "flatPath": "v1/organizations/{organizationsId}/locations/global/tenants/{tenantsId}:getIamPolicy", + // "flatPath": "v1/organizations/{organizationsId}/locations/global/partnerTenants/{partnerTenantsId}:getIamPolicy", // "httpMethod": "GET", - // "id": "beyondcorp.organizations.locations.global.tenants.getIamPolicy", + // "id": "beyondcorp.organizations.locations.global.partnerTenants.getIamPolicy", // "parameterOrder": [ // "resource" // ], @@ -3031,7 +3031,7 @@ func (c *OrganizationsLocationsGlobalTenantsGetIamPolicyCall) Do(opts ...googlea // "resource": { // "description": "REQUIRED: The resource for which the policy is being requested. See [Resource names](https://cloud.google.com/apis/design/resource_names) for the appropriate value for this field.", // "location": "path", - // "pattern": "^organizations/[^/]+/locations/global/tenants/[^/]+$", + // "pattern": "^organizations/[^/]+/locations/global/partnerTenants/[^/]+$", // "required": true, // "type": "string" // } @@ -3047,9 +3047,9 @@ func (c *OrganizationsLocationsGlobalTenantsGetIamPolicyCall) Do(opts ...googlea } -// method id "beyondcorp.organizations.locations.global.tenants.setIamPolicy": +// method id "beyondcorp.organizations.locations.global.partnerTenants.setIamPolicy": -type OrganizationsLocationsGlobalTenantsSetIamPolicyCall struct { +type OrganizationsLocationsGlobalPartnerTenantsSetIamPolicyCall struct { s *Service resource string googleiamv1setiampolicyrequest *GoogleIamV1SetIamPolicyRequest @@ -3066,8 +3066,8 @@ type OrganizationsLocationsGlobalTenantsSetIamPolicyCall struct { // specified. See Resource names // (https://cloud.google.com/apis/design/resource_names) for the // appropriate value for this field. -func (r *OrganizationsLocationsGlobalTenantsService) SetIamPolicy(resource string, googleiamv1setiampolicyrequest *GoogleIamV1SetIamPolicyRequest) *OrganizationsLocationsGlobalTenantsSetIamPolicyCall { - c := &OrganizationsLocationsGlobalTenantsSetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)} +func (r *OrganizationsLocationsGlobalPartnerTenantsService) SetIamPolicy(resource string, googleiamv1setiampolicyrequest *GoogleIamV1SetIamPolicyRequest) *OrganizationsLocationsGlobalPartnerTenantsSetIamPolicyCall { + c := &OrganizationsLocationsGlobalPartnerTenantsSetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.resource = resource c.googleiamv1setiampolicyrequest = googleiamv1setiampolicyrequest return c @@ -3076,7 +3076,7 @@ func (r *OrganizationsLocationsGlobalTenantsService) SetIamPolicy(resource strin // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *OrganizationsLocationsGlobalTenantsSetIamPolicyCall) Fields(s ...googleapi.Field) *OrganizationsLocationsGlobalTenantsSetIamPolicyCall { +func (c *OrganizationsLocationsGlobalPartnerTenantsSetIamPolicyCall) Fields(s ...googleapi.Field) *OrganizationsLocationsGlobalPartnerTenantsSetIamPolicyCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -3084,21 +3084,21 @@ func (c *OrganizationsLocationsGlobalTenantsSetIamPolicyCall) Fields(s ...google // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *OrganizationsLocationsGlobalTenantsSetIamPolicyCall) Context(ctx context.Context) *OrganizationsLocationsGlobalTenantsSetIamPolicyCall { +func (c *OrganizationsLocationsGlobalPartnerTenantsSetIamPolicyCall) Context(ctx context.Context) *OrganizationsLocationsGlobalPartnerTenantsSetIamPolicyCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *OrganizationsLocationsGlobalTenantsSetIamPolicyCall) Header() http.Header { +func (c *OrganizationsLocationsGlobalPartnerTenantsSetIamPolicyCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *OrganizationsLocationsGlobalTenantsSetIamPolicyCall) doRequest(alt string) (*http.Response, error) { +func (c *OrganizationsLocationsGlobalPartnerTenantsSetIamPolicyCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { @@ -3126,14 +3126,14 @@ func (c *OrganizationsLocationsGlobalTenantsSetIamPolicyCall) doRequest(alt stri return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "beyondcorp.organizations.locations.global.tenants.setIamPolicy" call. +// Do executes the "beyondcorp.organizations.locations.global.partnerTenants.setIamPolicy" call. // Exactly one of *GoogleIamV1Policy or error will be non-nil. Any // non-2xx status code is an error. Response headers are in either // *GoogleIamV1Policy.ServerResponse.Header or (if a response was // returned at all) in error.(*googleapi.Error).Header. Use // googleapi.IsNotModified to check whether the returned error was // because http.StatusNotModified was returned. -func (c *OrganizationsLocationsGlobalTenantsSetIamPolicyCall) Do(opts ...googleapi.CallOption) (*GoogleIamV1Policy, error) { +func (c *OrganizationsLocationsGlobalPartnerTenantsSetIamPolicyCall) Do(opts ...googleapi.CallOption) (*GoogleIamV1Policy, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -3165,9 +3165,9 @@ func (c *OrganizationsLocationsGlobalTenantsSetIamPolicyCall) Do(opts ...googlea return ret, nil // { // "description": "Sets the access control policy on the specified resource. Replaces any existing policy. Can return `NOT_FOUND`, `INVALID_ARGUMENT`, and `PERMISSION_DENIED` errors.", - // "flatPath": "v1/organizations/{organizationsId}/locations/global/tenants/{tenantsId}:setIamPolicy", + // "flatPath": "v1/organizations/{organizationsId}/locations/global/partnerTenants/{partnerTenantsId}:setIamPolicy", // "httpMethod": "POST", - // "id": "beyondcorp.organizations.locations.global.tenants.setIamPolicy", + // "id": "beyondcorp.organizations.locations.global.partnerTenants.setIamPolicy", // "parameterOrder": [ // "resource" // ], @@ -3175,7 +3175,7 @@ func (c *OrganizationsLocationsGlobalTenantsSetIamPolicyCall) Do(opts ...googlea // "resource": { // "description": "REQUIRED: The resource for which the policy is being specified. See [Resource names](https://cloud.google.com/apis/design/resource_names) for the appropriate value for this field.", // "location": "path", - // "pattern": "^organizations/[^/]+/locations/global/tenants/[^/]+$", + // "pattern": "^organizations/[^/]+/locations/global/partnerTenants/[^/]+$", // "required": true, // "type": "string" // } @@ -3194,9 +3194,9 @@ func (c *OrganizationsLocationsGlobalTenantsSetIamPolicyCall) Do(opts ...googlea } -// method id "beyondcorp.organizations.locations.global.tenants.testIamPermissions": +// method id "beyondcorp.organizations.locations.global.partnerTenants.testIamPermissions": -type OrganizationsLocationsGlobalTenantsTestIamPermissionsCall struct { +type OrganizationsLocationsGlobalPartnerTenantsTestIamPermissionsCall struct { s *Service resource string googleiamv1testiampermissionsrequest *GoogleIamV1TestIamPermissionsRequest @@ -3216,8 +3216,8 @@ type OrganizationsLocationsGlobalTenantsTestIamPermissionsCall struct { // being requested. See Resource names // (https://cloud.google.com/apis/design/resource_names) for the // appropriate value for this field. -func (r *OrganizationsLocationsGlobalTenantsService) TestIamPermissions(resource string, googleiamv1testiampermissionsrequest *GoogleIamV1TestIamPermissionsRequest) *OrganizationsLocationsGlobalTenantsTestIamPermissionsCall { - c := &OrganizationsLocationsGlobalTenantsTestIamPermissionsCall{s: r.s, urlParams_: make(gensupport.URLParams)} +func (r *OrganizationsLocationsGlobalPartnerTenantsService) TestIamPermissions(resource string, googleiamv1testiampermissionsrequest *GoogleIamV1TestIamPermissionsRequest) *OrganizationsLocationsGlobalPartnerTenantsTestIamPermissionsCall { + c := &OrganizationsLocationsGlobalPartnerTenantsTestIamPermissionsCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.resource = resource c.googleiamv1testiampermissionsrequest = googleiamv1testiampermissionsrequest return c @@ -3226,7 +3226,7 @@ func (r *OrganizationsLocationsGlobalTenantsService) TestIamPermissions(resource // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *OrganizationsLocationsGlobalTenantsTestIamPermissionsCall) Fields(s ...googleapi.Field) *OrganizationsLocationsGlobalTenantsTestIamPermissionsCall { +func (c *OrganizationsLocationsGlobalPartnerTenantsTestIamPermissionsCall) Fields(s ...googleapi.Field) *OrganizationsLocationsGlobalPartnerTenantsTestIamPermissionsCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -3234,21 +3234,21 @@ func (c *OrganizationsLocationsGlobalTenantsTestIamPermissionsCall) Fields(s ... // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *OrganizationsLocationsGlobalTenantsTestIamPermissionsCall) Context(ctx context.Context) *OrganizationsLocationsGlobalTenantsTestIamPermissionsCall { +func (c *OrganizationsLocationsGlobalPartnerTenantsTestIamPermissionsCall) Context(ctx context.Context) *OrganizationsLocationsGlobalPartnerTenantsTestIamPermissionsCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *OrganizationsLocationsGlobalTenantsTestIamPermissionsCall) Header() http.Header { +func (c *OrganizationsLocationsGlobalPartnerTenantsTestIamPermissionsCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *OrganizationsLocationsGlobalTenantsTestIamPermissionsCall) doRequest(alt string) (*http.Response, error) { +func (c *OrganizationsLocationsGlobalPartnerTenantsTestIamPermissionsCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { @@ -3276,7 +3276,7 @@ func (c *OrganizationsLocationsGlobalTenantsTestIamPermissionsCall) doRequest(al return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "beyondcorp.organizations.locations.global.tenants.testIamPermissions" call. +// Do executes the "beyondcorp.organizations.locations.global.partnerTenants.testIamPermissions" call. // Exactly one of *GoogleIamV1TestIamPermissionsResponse or error will // be non-nil. Any non-2xx status code is an error. Response headers are // in either @@ -3284,7 +3284,7 @@ func (c *OrganizationsLocationsGlobalTenantsTestIamPermissionsCall) doRequest(al // response was returned at all) in error.(*googleapi.Error).Header. Use // googleapi.IsNotModified to check whether the returned error was // because http.StatusNotModified was returned. -func (c *OrganizationsLocationsGlobalTenantsTestIamPermissionsCall) Do(opts ...googleapi.CallOption) (*GoogleIamV1TestIamPermissionsResponse, error) { +func (c *OrganizationsLocationsGlobalPartnerTenantsTestIamPermissionsCall) Do(opts ...googleapi.CallOption) (*GoogleIamV1TestIamPermissionsResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -3316,9 +3316,9 @@ func (c *OrganizationsLocationsGlobalTenantsTestIamPermissionsCall) Do(opts ...g return ret, nil // { // "description": "Returns permissions that a caller has on the specified resource. If the resource does not exist, this will return an empty set of permissions, not a `NOT_FOUND` error. Note: This operation is designed to be used for building permission-aware UIs and command-line tools, not for authorization checking. This operation may \"fail open\" without warning.", - // "flatPath": "v1/organizations/{organizationsId}/locations/global/tenants/{tenantsId}:testIamPermissions", + // "flatPath": "v1/organizations/{organizationsId}/locations/global/partnerTenants/{partnerTenantsId}:testIamPermissions", // "httpMethod": "POST", - // "id": "beyondcorp.organizations.locations.global.tenants.testIamPermissions", + // "id": "beyondcorp.organizations.locations.global.partnerTenants.testIamPermissions", // "parameterOrder": [ // "resource" // ], @@ -3326,7 +3326,7 @@ func (c *OrganizationsLocationsGlobalTenantsTestIamPermissionsCall) Do(opts ...g // "resource": { // "description": "REQUIRED: The resource for which the policy detail is being requested. See [Resource names](https://cloud.google.com/apis/design/resource_names) for the appropriate value for this field.", // "location": "path", - // "pattern": "^organizations/[^/]+/locations/global/tenants/[^/]+$", + // "pattern": "^organizations/[^/]+/locations/global/partnerTenants/[^/]+$", // "required": true, // "type": "string" // } @@ -3345,9 +3345,9 @@ func (c *OrganizationsLocationsGlobalTenantsTestIamPermissionsCall) Do(opts ...g } -// method id "beyondcorp.organizations.locations.global.tenants.proxyConfigs.getIamPolicy": +// method id "beyondcorp.organizations.locations.global.partnerTenants.proxyConfigs.getIamPolicy": -type OrganizationsLocationsGlobalTenantsProxyConfigsGetIamPolicyCall struct { +type OrganizationsLocationsGlobalPartnerTenantsProxyConfigsGetIamPolicyCall struct { s *Service resource string urlParams_ gensupport.URLParams @@ -3364,8 +3364,8 @@ type OrganizationsLocationsGlobalTenantsProxyConfigsGetIamPolicyCall struct { // requested. See Resource names // (https://cloud.google.com/apis/design/resource_names) for the // appropriate value for this field. -func (r *OrganizationsLocationsGlobalTenantsProxyConfigsService) GetIamPolicy(resource string) *OrganizationsLocationsGlobalTenantsProxyConfigsGetIamPolicyCall { - c := &OrganizationsLocationsGlobalTenantsProxyConfigsGetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)} +func (r *OrganizationsLocationsGlobalPartnerTenantsProxyConfigsService) GetIamPolicy(resource string) *OrganizationsLocationsGlobalPartnerTenantsProxyConfigsGetIamPolicyCall { + c := &OrganizationsLocationsGlobalPartnerTenantsProxyConfigsGetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.resource = resource return c } @@ -3383,7 +3383,7 @@ func (r *OrganizationsLocationsGlobalTenantsProxyConfigsService) GetIamPolicy(re // which resources support conditions in their IAM policies, see the IAM // documentation // (https://cloud.google.com/iam/help/conditions/resource-policies). -func (c *OrganizationsLocationsGlobalTenantsProxyConfigsGetIamPolicyCall) OptionsRequestedPolicyVersion(optionsRequestedPolicyVersion int64) *OrganizationsLocationsGlobalTenantsProxyConfigsGetIamPolicyCall { +func (c *OrganizationsLocationsGlobalPartnerTenantsProxyConfigsGetIamPolicyCall) OptionsRequestedPolicyVersion(optionsRequestedPolicyVersion int64) *OrganizationsLocationsGlobalPartnerTenantsProxyConfigsGetIamPolicyCall { c.urlParams_.Set("options.requestedPolicyVersion", fmt.Sprint(optionsRequestedPolicyVersion)) return c } @@ -3391,7 +3391,7 @@ func (c *OrganizationsLocationsGlobalTenantsProxyConfigsGetIamPolicyCall) Option // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *OrganizationsLocationsGlobalTenantsProxyConfigsGetIamPolicyCall) Fields(s ...googleapi.Field) *OrganizationsLocationsGlobalTenantsProxyConfigsGetIamPolicyCall { +func (c *OrganizationsLocationsGlobalPartnerTenantsProxyConfigsGetIamPolicyCall) Fields(s ...googleapi.Field) *OrganizationsLocationsGlobalPartnerTenantsProxyConfigsGetIamPolicyCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -3401,7 +3401,7 @@ func (c *OrganizationsLocationsGlobalTenantsProxyConfigsGetIamPolicyCall) Fields // getting updates only after the object has changed since the last // request. Use googleapi.IsNotModified to check whether the response // error from Do is the result of In-None-Match. -func (c *OrganizationsLocationsGlobalTenantsProxyConfigsGetIamPolicyCall) IfNoneMatch(entityTag string) *OrganizationsLocationsGlobalTenantsProxyConfigsGetIamPolicyCall { +func (c *OrganizationsLocationsGlobalPartnerTenantsProxyConfigsGetIamPolicyCall) IfNoneMatch(entityTag string) *OrganizationsLocationsGlobalPartnerTenantsProxyConfigsGetIamPolicyCall { c.ifNoneMatch_ = entityTag return c } @@ -3409,21 +3409,21 @@ func (c *OrganizationsLocationsGlobalTenantsProxyConfigsGetIamPolicyCall) IfNone // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *OrganizationsLocationsGlobalTenantsProxyConfigsGetIamPolicyCall) Context(ctx context.Context) *OrganizationsLocationsGlobalTenantsProxyConfigsGetIamPolicyCall { +func (c *OrganizationsLocationsGlobalPartnerTenantsProxyConfigsGetIamPolicyCall) Context(ctx context.Context) *OrganizationsLocationsGlobalPartnerTenantsProxyConfigsGetIamPolicyCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *OrganizationsLocationsGlobalTenantsProxyConfigsGetIamPolicyCall) Header() http.Header { +func (c *OrganizationsLocationsGlobalPartnerTenantsProxyConfigsGetIamPolicyCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *OrganizationsLocationsGlobalTenantsProxyConfigsGetIamPolicyCall) doRequest(alt string) (*http.Response, error) { +func (c *OrganizationsLocationsGlobalPartnerTenantsProxyConfigsGetIamPolicyCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { @@ -3449,14 +3449,14 @@ func (c *OrganizationsLocationsGlobalTenantsProxyConfigsGetIamPolicyCall) doRequ return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "beyondcorp.organizations.locations.global.tenants.proxyConfigs.getIamPolicy" call. +// Do executes the "beyondcorp.organizations.locations.global.partnerTenants.proxyConfigs.getIamPolicy" call. // Exactly one of *GoogleIamV1Policy or error will be non-nil. Any // non-2xx status code is an error. Response headers are in either // *GoogleIamV1Policy.ServerResponse.Header or (if a response was // returned at all) in error.(*googleapi.Error).Header. Use // googleapi.IsNotModified to check whether the returned error was // because http.StatusNotModified was returned. -func (c *OrganizationsLocationsGlobalTenantsProxyConfigsGetIamPolicyCall) Do(opts ...googleapi.CallOption) (*GoogleIamV1Policy, error) { +func (c *OrganizationsLocationsGlobalPartnerTenantsProxyConfigsGetIamPolicyCall) Do(opts ...googleapi.CallOption) (*GoogleIamV1Policy, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -3488,9 +3488,9 @@ func (c *OrganizationsLocationsGlobalTenantsProxyConfigsGetIamPolicyCall) Do(opt return ret, nil // { // "description": "Gets the access control policy for a resource. Returns an empty policy if the resource exists and does not have a policy set.", - // "flatPath": "v1/organizations/{organizationsId}/locations/global/tenants/{tenantsId}/proxyConfigs/{proxyConfigsId}:getIamPolicy", + // "flatPath": "v1/organizations/{organizationsId}/locations/global/partnerTenants/{partnerTenantsId}/proxyConfigs/{proxyConfigsId}:getIamPolicy", // "httpMethod": "GET", - // "id": "beyondcorp.organizations.locations.global.tenants.proxyConfigs.getIamPolicy", + // "id": "beyondcorp.organizations.locations.global.partnerTenants.proxyConfigs.getIamPolicy", // "parameterOrder": [ // "resource" // ], @@ -3504,7 +3504,7 @@ func (c *OrganizationsLocationsGlobalTenantsProxyConfigsGetIamPolicyCall) Do(opt // "resource": { // "description": "REQUIRED: The resource for which the policy is being requested. See [Resource names](https://cloud.google.com/apis/design/resource_names) for the appropriate value for this field.", // "location": "path", - // "pattern": "^organizations/[^/]+/locations/global/tenants/[^/]+/proxyConfigs/[^/]+$", + // "pattern": "^organizations/[^/]+/locations/global/partnerTenants/[^/]+/proxyConfigs/[^/]+$", // "required": true, // "type": "string" // } @@ -3520,9 +3520,9 @@ func (c *OrganizationsLocationsGlobalTenantsProxyConfigsGetIamPolicyCall) Do(opt } -// method id "beyondcorp.organizations.locations.global.tenants.proxyConfigs.setIamPolicy": +// method id "beyondcorp.organizations.locations.global.partnerTenants.proxyConfigs.setIamPolicy": -type OrganizationsLocationsGlobalTenantsProxyConfigsSetIamPolicyCall struct { +type OrganizationsLocationsGlobalPartnerTenantsProxyConfigsSetIamPolicyCall struct { s *Service resource string googleiamv1setiampolicyrequest *GoogleIamV1SetIamPolicyRequest @@ -3539,8 +3539,8 @@ type OrganizationsLocationsGlobalTenantsProxyConfigsSetIamPolicyCall struct { // specified. See Resource names // (https://cloud.google.com/apis/design/resource_names) for the // appropriate value for this field. -func (r *OrganizationsLocationsGlobalTenantsProxyConfigsService) SetIamPolicy(resource string, googleiamv1setiampolicyrequest *GoogleIamV1SetIamPolicyRequest) *OrganizationsLocationsGlobalTenantsProxyConfigsSetIamPolicyCall { - c := &OrganizationsLocationsGlobalTenantsProxyConfigsSetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)} +func (r *OrganizationsLocationsGlobalPartnerTenantsProxyConfigsService) SetIamPolicy(resource string, googleiamv1setiampolicyrequest *GoogleIamV1SetIamPolicyRequest) *OrganizationsLocationsGlobalPartnerTenantsProxyConfigsSetIamPolicyCall { + c := &OrganizationsLocationsGlobalPartnerTenantsProxyConfigsSetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.resource = resource c.googleiamv1setiampolicyrequest = googleiamv1setiampolicyrequest return c @@ -3549,7 +3549,7 @@ func (r *OrganizationsLocationsGlobalTenantsProxyConfigsService) SetIamPolicy(re // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *OrganizationsLocationsGlobalTenantsProxyConfigsSetIamPolicyCall) Fields(s ...googleapi.Field) *OrganizationsLocationsGlobalTenantsProxyConfigsSetIamPolicyCall { +func (c *OrganizationsLocationsGlobalPartnerTenantsProxyConfigsSetIamPolicyCall) Fields(s ...googleapi.Field) *OrganizationsLocationsGlobalPartnerTenantsProxyConfigsSetIamPolicyCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -3557,21 +3557,21 @@ func (c *OrganizationsLocationsGlobalTenantsProxyConfigsSetIamPolicyCall) Fields // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *OrganizationsLocationsGlobalTenantsProxyConfigsSetIamPolicyCall) Context(ctx context.Context) *OrganizationsLocationsGlobalTenantsProxyConfigsSetIamPolicyCall { +func (c *OrganizationsLocationsGlobalPartnerTenantsProxyConfigsSetIamPolicyCall) Context(ctx context.Context) *OrganizationsLocationsGlobalPartnerTenantsProxyConfigsSetIamPolicyCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *OrganizationsLocationsGlobalTenantsProxyConfigsSetIamPolicyCall) Header() http.Header { +func (c *OrganizationsLocationsGlobalPartnerTenantsProxyConfigsSetIamPolicyCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *OrganizationsLocationsGlobalTenantsProxyConfigsSetIamPolicyCall) doRequest(alt string) (*http.Response, error) { +func (c *OrganizationsLocationsGlobalPartnerTenantsProxyConfigsSetIamPolicyCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { @@ -3599,14 +3599,14 @@ func (c *OrganizationsLocationsGlobalTenantsProxyConfigsSetIamPolicyCall) doRequ return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "beyondcorp.organizations.locations.global.tenants.proxyConfigs.setIamPolicy" call. +// Do executes the "beyondcorp.organizations.locations.global.partnerTenants.proxyConfigs.setIamPolicy" call. // Exactly one of *GoogleIamV1Policy or error will be non-nil. Any // non-2xx status code is an error. Response headers are in either // *GoogleIamV1Policy.ServerResponse.Header or (if a response was // returned at all) in error.(*googleapi.Error).Header. Use // googleapi.IsNotModified to check whether the returned error was // because http.StatusNotModified was returned. -func (c *OrganizationsLocationsGlobalTenantsProxyConfigsSetIamPolicyCall) Do(opts ...googleapi.CallOption) (*GoogleIamV1Policy, error) { +func (c *OrganizationsLocationsGlobalPartnerTenantsProxyConfigsSetIamPolicyCall) Do(opts ...googleapi.CallOption) (*GoogleIamV1Policy, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -3638,9 +3638,9 @@ func (c *OrganizationsLocationsGlobalTenantsProxyConfigsSetIamPolicyCall) Do(opt return ret, nil // { // "description": "Sets the access control policy on the specified resource. Replaces any existing policy. Can return `NOT_FOUND`, `INVALID_ARGUMENT`, and `PERMISSION_DENIED` errors.", - // "flatPath": "v1/organizations/{organizationsId}/locations/global/tenants/{tenantsId}/proxyConfigs/{proxyConfigsId}:setIamPolicy", + // "flatPath": "v1/organizations/{organizationsId}/locations/global/partnerTenants/{partnerTenantsId}/proxyConfigs/{proxyConfigsId}:setIamPolicy", // "httpMethod": "POST", - // "id": "beyondcorp.organizations.locations.global.tenants.proxyConfigs.setIamPolicy", + // "id": "beyondcorp.organizations.locations.global.partnerTenants.proxyConfigs.setIamPolicy", // "parameterOrder": [ // "resource" // ], @@ -3648,7 +3648,7 @@ func (c *OrganizationsLocationsGlobalTenantsProxyConfigsSetIamPolicyCall) Do(opt // "resource": { // "description": "REQUIRED: The resource for which the policy is being specified. See [Resource names](https://cloud.google.com/apis/design/resource_names) for the appropriate value for this field.", // "location": "path", - // "pattern": "^organizations/[^/]+/locations/global/tenants/[^/]+/proxyConfigs/[^/]+$", + // "pattern": "^organizations/[^/]+/locations/global/partnerTenants/[^/]+/proxyConfigs/[^/]+$", // "required": true, // "type": "string" // } @@ -3667,9 +3667,9 @@ func (c *OrganizationsLocationsGlobalTenantsProxyConfigsSetIamPolicyCall) Do(opt } -// method id "beyondcorp.organizations.locations.global.tenants.proxyConfigs.testIamPermissions": +// method id "beyondcorp.organizations.locations.global.partnerTenants.proxyConfigs.testIamPermissions": -type OrganizationsLocationsGlobalTenantsProxyConfigsTestIamPermissionsCall struct { +type OrganizationsLocationsGlobalPartnerTenantsProxyConfigsTestIamPermissionsCall struct { s *Service resource string googleiamv1testiampermissionsrequest *GoogleIamV1TestIamPermissionsRequest @@ -3689,8 +3689,8 @@ type OrganizationsLocationsGlobalTenantsProxyConfigsTestIamPermissionsCall struc // being requested. See Resource names // (https://cloud.google.com/apis/design/resource_names) for the // appropriate value for this field. -func (r *OrganizationsLocationsGlobalTenantsProxyConfigsService) TestIamPermissions(resource string, googleiamv1testiampermissionsrequest *GoogleIamV1TestIamPermissionsRequest) *OrganizationsLocationsGlobalTenantsProxyConfigsTestIamPermissionsCall { - c := &OrganizationsLocationsGlobalTenantsProxyConfigsTestIamPermissionsCall{s: r.s, urlParams_: make(gensupport.URLParams)} +func (r *OrganizationsLocationsGlobalPartnerTenantsProxyConfigsService) TestIamPermissions(resource string, googleiamv1testiampermissionsrequest *GoogleIamV1TestIamPermissionsRequest) *OrganizationsLocationsGlobalPartnerTenantsProxyConfigsTestIamPermissionsCall { + c := &OrganizationsLocationsGlobalPartnerTenantsProxyConfigsTestIamPermissionsCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.resource = resource c.googleiamv1testiampermissionsrequest = googleiamv1testiampermissionsrequest return c @@ -3699,7 +3699,7 @@ func (r *OrganizationsLocationsGlobalTenantsProxyConfigsService) TestIamPermissi // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *OrganizationsLocationsGlobalTenantsProxyConfigsTestIamPermissionsCall) Fields(s ...googleapi.Field) *OrganizationsLocationsGlobalTenantsProxyConfigsTestIamPermissionsCall { +func (c *OrganizationsLocationsGlobalPartnerTenantsProxyConfigsTestIamPermissionsCall) Fields(s ...googleapi.Field) *OrganizationsLocationsGlobalPartnerTenantsProxyConfigsTestIamPermissionsCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -3707,21 +3707,21 @@ func (c *OrganizationsLocationsGlobalTenantsProxyConfigsTestIamPermissionsCall) // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *OrganizationsLocationsGlobalTenantsProxyConfigsTestIamPermissionsCall) Context(ctx context.Context) *OrganizationsLocationsGlobalTenantsProxyConfigsTestIamPermissionsCall { +func (c *OrganizationsLocationsGlobalPartnerTenantsProxyConfigsTestIamPermissionsCall) Context(ctx context.Context) *OrganizationsLocationsGlobalPartnerTenantsProxyConfigsTestIamPermissionsCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *OrganizationsLocationsGlobalTenantsProxyConfigsTestIamPermissionsCall) Header() http.Header { +func (c *OrganizationsLocationsGlobalPartnerTenantsProxyConfigsTestIamPermissionsCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *OrganizationsLocationsGlobalTenantsProxyConfigsTestIamPermissionsCall) doRequest(alt string) (*http.Response, error) { +func (c *OrganizationsLocationsGlobalPartnerTenantsProxyConfigsTestIamPermissionsCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { @@ -3749,7 +3749,7 @@ func (c *OrganizationsLocationsGlobalTenantsProxyConfigsTestIamPermissionsCall) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "beyondcorp.organizations.locations.global.tenants.proxyConfigs.testIamPermissions" call. +// Do executes the "beyondcorp.organizations.locations.global.partnerTenants.proxyConfigs.testIamPermissions" call. // Exactly one of *GoogleIamV1TestIamPermissionsResponse or error will // be non-nil. Any non-2xx status code is an error. Response headers are // in either @@ -3757,7 +3757,7 @@ func (c *OrganizationsLocationsGlobalTenantsProxyConfigsTestIamPermissionsCall) // response was returned at all) in error.(*googleapi.Error).Header. Use // googleapi.IsNotModified to check whether the returned error was // because http.StatusNotModified was returned. -func (c *OrganizationsLocationsGlobalTenantsProxyConfigsTestIamPermissionsCall) Do(opts ...googleapi.CallOption) (*GoogleIamV1TestIamPermissionsResponse, error) { +func (c *OrganizationsLocationsGlobalPartnerTenantsProxyConfigsTestIamPermissionsCall) Do(opts ...googleapi.CallOption) (*GoogleIamV1TestIamPermissionsResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -3789,9 +3789,9 @@ func (c *OrganizationsLocationsGlobalTenantsProxyConfigsTestIamPermissionsCall) return ret, nil // { // "description": "Returns permissions that a caller has on the specified resource. If the resource does not exist, this will return an empty set of permissions, not a `NOT_FOUND` error. Note: This operation is designed to be used for building permission-aware UIs and command-line tools, not for authorization checking. This operation may \"fail open\" without warning.", - // "flatPath": "v1/organizations/{organizationsId}/locations/global/tenants/{tenantsId}/proxyConfigs/{proxyConfigsId}:testIamPermissions", + // "flatPath": "v1/organizations/{organizationsId}/locations/global/partnerTenants/{partnerTenantsId}/proxyConfigs/{proxyConfigsId}:testIamPermissions", // "httpMethod": "POST", - // "id": "beyondcorp.organizations.locations.global.tenants.proxyConfigs.testIamPermissions", + // "id": "beyondcorp.organizations.locations.global.partnerTenants.proxyConfigs.testIamPermissions", // "parameterOrder": [ // "resource" // ], @@ -3799,7 +3799,7 @@ func (c *OrganizationsLocationsGlobalTenantsProxyConfigsTestIamPermissionsCall) // "resource": { // "description": "REQUIRED: The resource for which the policy detail is being requested. See [Resource names](https://cloud.google.com/apis/design/resource_names) for the appropriate value for this field.", // "location": "path", - // "pattern": "^organizations/[^/]+/locations/global/tenants/[^/]+/proxyConfigs/[^/]+$", + // "pattern": "^organizations/[^/]+/locations/global/partnerTenants/[^/]+/proxyConfigs/[^/]+$", // "required": true, // "type": "string" // } diff --git a/beyondcorp/v1alpha/beyondcorp-api.json b/beyondcorp/v1alpha/beyondcorp-api.json index 48b4b17051c..ec7ee2206c2 100644 --- a/beyondcorp/v1alpha/beyondcorp-api.json +++ b/beyondcorp/v1alpha/beyondcorp-api.json @@ -111,6 +111,68 @@ "resources": { "global": { "resources": { + "partnerTenants": { + "methods": { + "create": { + "description": "Creates a new BeyondCorp Enterprise partnerTenant in a given organization and can only be called by onboarded BeyondCorp Enterprise partner.", + "flatPath": "v1alpha/organizations/{organizationsId}/locations/global/partnerTenants", + "httpMethod": "POST", + "id": "beyondcorp.organizations.locations.global.partnerTenants.create", + "parameterOrder": [ + "parent" + ], + "parameters": { + "parent": { + "description": "Required. The resource name of the PartnerTenant using the form: `organizations/{organization_id}/locations/global`", + "location": "path", + "pattern": "^organizations/[^/]+/locations/global$", + "required": true, + "type": "string" + }, + "requestId": { + "description": "Optional. An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. The server will guarantee that for at least 60 minutes since the first request. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", + "location": "query", + "type": "string" + } + }, + "path": "v1alpha/{+parent}/partnerTenants", + "request": { + "$ref": "GoogleCloudBeyondcorpPartnerservicesV1alphaPartnerTenant" + }, + "response": { + "$ref": "GoogleLongrunningOperation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "get": { + "description": "Gets details of a single PartnerTenant.", + "flatPath": "v1alpha/organizations/{organizationsId}/locations/global/partnerTenants/{partnerTenantsId}", + "httpMethod": "GET", + "id": "beyondcorp.organizations.locations.global.partnerTenants.get", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Required. The resource name of the PartnerTenant using the form: `organizations/{organization_id}/locations/global/partnerTenants/{partner_tenant_id}`", + "location": "path", + "pattern": "^organizations/[^/]+/locations/global/partnerTenants/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1alpha/{+name}", + "response": { + "$ref": "GoogleCloudBeyondcorpPartnerservicesV1alphaPartnerTenant" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + } + } + }, "tenants": { "methods": { "create": { @@ -176,7 +238,7 @@ "proxyConfigs": { "methods": { "create": { - "description": "Creates a new BeyondCorp Enterprise ProxyConfiguration in a given organization and tenant. Can only be called by on onboarded Beyondcorp Enterprise partner.", + "description": "Creates a new BeyondCorp Enterprise ProxyConfiguration in a given organization and PartnerTenant. Can only be called by on onboarded Beyondcorp Enterprise partner.", "flatPath": "v1alpha/organizations/{organizationsId}/locations/global/tenants/{tenantsId}/proxyConfigs", "httpMethod": "POST", "id": "beyondcorp.organizations.locations.global.tenants.proxyConfigs.create", @@ -209,7 +271,7 @@ ] }, "get": { - "description": "Gets details of a single Tenant.", + "description": "Gets details of a single ProxyConfig.", "flatPath": "v1alpha/organizations/{organizationsId}/locations/global/tenants/{tenantsId}/proxyConfigs/{proxyConfigsId}", "httpMethod": "GET", "id": "beyondcorp.organizations.locations.global.tenants.proxyConfigs.get", @@ -3202,7 +3264,7 @@ } } }, - "revision": "20230501", + "revision": "20230509", "rootUrl": "https://beyondcorp.googleapis.com/", "schemas": { "AllocatedConnection": { @@ -4831,23 +4893,27 @@ }, "type": "object" }, - "GoogleCloudBeyondcorpPartnerservicesV1alphaAuthenticationInfo": { - "description": "Message contains the authentication information to validate against the proxy server.", - "id": "GoogleCloudBeyondcorpPartnerservicesV1alphaAuthenticationInfo", + "GoogleCloudBeyondcorpPartnerservicesV1alphaEncryptionInfo": { + "description": "Message contains the JWT encryption information for the proxy server.", + "id": "GoogleCloudBeyondcorpPartnerservicesV1alphaEncryptionInfo", "properties": { "encryptionSaEmail": { - "description": "Optional. Service Account for encrypting the JWT.", + "description": "Optional. Service Account for encryption key.", + "type": "string" + }, + "jwk": { + "description": "Optional. JWK in string.", "type": "string" } }, "type": "object" }, "GoogleCloudBeyondcorpPartnerservicesV1alphaPartnerMetadata": { - "description": "Metadata associated with Tenant and is provided by the Partner.", + "description": "Metadata associated with PartnerTenant and is provided by the Partner.", "id": "GoogleCloudBeyondcorpPartnerservicesV1alphaPartnerMetadata", "properties": { "partnerTenantId": { - "description": "Optional. UUID used by the Partner to refer to the Tenant in their internal systems.", + "description": "Optional. UUID used by the Partner to refer to the PartnerTenant in their internal systems.", "type": "string" } }, @@ -4897,14 +4963,50 @@ }, "type": "object" }, + "GoogleCloudBeyondcorpPartnerservicesV1alphaPartnerTenant": { + "description": "Information about a BeyoncCorp Enterprise PartnerTenant.", + "id": "GoogleCloudBeyondcorpPartnerservicesV1alphaPartnerTenant", + "properties": { + "createTime": { + "description": "Output only. Timestamp when the resource was created.", + "format": "google-datetime", + "readOnly": true, + "type": "string" + }, + "displayName": { + "description": "Optional. An arbitrary caller-provided name for the PartnerTenant. Cannot exceed 64 characters.", + "type": "string" + }, + "googleGroupEmail": { + "description": "Optional. Google group email to which the PartnerTenant is enabled.", + "type": "string" + }, + "googleGroupId": { + "description": "Optional. Google group ID to which the PartnerTenant is enabled.", + "type": "string" + }, + "name": { + "description": "Output only. Unique resource name of the PartnerTenant. The name is ignored when creating PartnerTenant.", + "readOnly": true, + "type": "string" + }, + "partnerMetadata": { + "$ref": "GoogleCloudBeyondcorpPartnerservicesV1alphaPartnerMetadata", + "description": "Optional. Metadata provided by the Partner associated with PartnerTenant." + }, + "updateTime": { + "description": "Output only. Timestamp when the resource was last modified.", + "format": "google-datetime", + "readOnly": true, + "type": "string" + } + }, + "type": "object" + }, "GoogleCloudBeyondcorpPartnerservicesV1alphaProxyConfig": { "description": "Proxy Configuration of a Tenant.", "id": "GoogleCloudBeyondcorpPartnerservicesV1alphaProxyConfig", "properties": { - "authenticationInfo": { - "$ref": "GoogleCloudBeyondcorpPartnerservicesV1alphaAuthenticationInfo", - "description": "Optional. Information to facilitate Authentication against the proxy server." - }, "createTime": { "description": "Output only. Timestamp when the resource was created.", "format": "google-datetime", @@ -4915,6 +5017,10 @@ "description": "Optional. An arbitrary caller-provided name for the ProxyConfig. Cannot exceed 64 characters.", "type": "string" }, + "encryptionInfo": { + "$ref": "GoogleCloudBeyondcorpPartnerservicesV1alphaEncryptionInfo", + "description": "Optional. Information to encrypt JWT for the proxy server." + }, "name": { "description": "Output only. ProxyConfig resource name.", "readOnly": true, diff --git a/beyondcorp/v1alpha/beyondcorp-gen.go b/beyondcorp/v1alpha/beyondcorp-gen.go index bc292c10a9d..6acb591bc7c 100644 --- a/beyondcorp/v1alpha/beyondcorp-gen.go +++ b/beyondcorp/v1alpha/beyondcorp-gen.go @@ -173,6 +173,7 @@ type OrganizationsLocationsService struct { func NewOrganizationsLocationsGlobalService(s *Service) *OrganizationsLocationsGlobalService { rs := &OrganizationsLocationsGlobalService{s: s} + rs.PartnerTenants = NewOrganizationsLocationsGlobalPartnerTenantsService(s) rs.Tenants = NewOrganizationsLocationsGlobalTenantsService(s) return rs } @@ -180,9 +181,20 @@ func NewOrganizationsLocationsGlobalService(s *Service) *OrganizationsLocationsG type OrganizationsLocationsGlobalService struct { s *Service + PartnerTenants *OrganizationsLocationsGlobalPartnerTenantsService + Tenants *OrganizationsLocationsGlobalTenantsService } +func NewOrganizationsLocationsGlobalPartnerTenantsService(s *Service) *OrganizationsLocationsGlobalPartnerTenantsService { + rs := &OrganizationsLocationsGlobalPartnerTenantsService{s: s} + return rs +} + +type OrganizationsLocationsGlobalPartnerTenantsService struct { + s *Service +} + func NewOrganizationsLocationsGlobalTenantsService(s *Service) *OrganizationsLocationsGlobalTenantsService { rs := &OrganizationsLocationsGlobalTenantsService{s: s} rs.ProxyConfigs = NewOrganizationsLocationsGlobalTenantsProxyConfigsService(s) @@ -2623,13 +2635,15 @@ func (s *GoogleCloudBeyondcorpAppgatewaysV1AppGatewayOperationMetadata) MarshalJ return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// GoogleCloudBeyondcorpPartnerservicesV1alphaAuthenticationInfo: -// Message contains the authentication information to validate against -// the proxy server. -type GoogleCloudBeyondcorpPartnerservicesV1alphaAuthenticationInfo struct { - // EncryptionSaEmail: Optional. Service Account for encrypting the JWT. +// GoogleCloudBeyondcorpPartnerservicesV1alphaEncryptionInfo: Message +// contains the JWT encryption information for the proxy server. +type GoogleCloudBeyondcorpPartnerservicesV1alphaEncryptionInfo struct { + // EncryptionSaEmail: Optional. Service Account for encryption key. EncryptionSaEmail string `json:"encryptionSaEmail,omitempty"` + // Jwk: Optional. JWK in string. + Jwk string `json:"jwk,omitempty"` + // ForceSendFields is a list of field names (e.g. "EncryptionSaEmail") // to unconditionally include in API requests. By default, fields with // empty or default values are omitted from API requests. However, any @@ -2648,17 +2662,17 @@ type GoogleCloudBeyondcorpPartnerservicesV1alphaAuthenticationInfo struct { NullFields []string `json:"-"` } -func (s *GoogleCloudBeyondcorpPartnerservicesV1alphaAuthenticationInfo) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudBeyondcorpPartnerservicesV1alphaAuthenticationInfo +func (s *GoogleCloudBeyondcorpPartnerservicesV1alphaEncryptionInfo) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudBeyondcorpPartnerservicesV1alphaEncryptionInfo raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } // GoogleCloudBeyondcorpPartnerservicesV1alphaPartnerMetadata: Metadata -// associated with Tenant and is provided by the Partner. +// associated with PartnerTenant and is provided by the Partner. type GoogleCloudBeyondcorpPartnerservicesV1alphaPartnerMetadata struct { // PartnerTenantId: Optional. UUID used by the Partner to refer to the - // Tenant in their internal systems. + // PartnerTenant in their internal systems. PartnerTenantId string `json:"partnerTenantId,omitempty"` // ForceSendFields is a list of field names (e.g. "PartnerTenantId") to @@ -2737,13 +2751,66 @@ func (s *GoogleCloudBeyondcorpPartnerservicesV1alphaPartnerServiceOperationMetad return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// GoogleCloudBeyondcorpPartnerservicesV1alphaPartnerTenant: Information +// about a BeyoncCorp Enterprise PartnerTenant. +type GoogleCloudBeyondcorpPartnerservicesV1alphaPartnerTenant struct { + // CreateTime: Output only. Timestamp when the resource was created. + CreateTime string `json:"createTime,omitempty"` + + // DisplayName: Optional. An arbitrary caller-provided name for the + // PartnerTenant. Cannot exceed 64 characters. + DisplayName string `json:"displayName,omitempty"` + + // GoogleGroupEmail: Optional. Google group email to which the + // PartnerTenant is enabled. + GoogleGroupEmail string `json:"googleGroupEmail,omitempty"` + + // GoogleGroupId: Optional. Google group ID to which the PartnerTenant + // is enabled. + GoogleGroupId string `json:"googleGroupId,omitempty"` + + // Name: Output only. Unique resource name of the PartnerTenant. The + // name is ignored when creating PartnerTenant. + Name string `json:"name,omitempty"` + + // PartnerMetadata: Optional. Metadata provided by the Partner + // associated with PartnerTenant. + PartnerMetadata *GoogleCloudBeyondcorpPartnerservicesV1alphaPartnerMetadata `json:"partnerMetadata,omitempty"` + + // UpdateTime: Output only. Timestamp when the resource was last + // modified. + UpdateTime string `json:"updateTime,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the + // server. + googleapi.ServerResponse `json:"-"` + + // ForceSendFields is a list of field names (e.g. "CreateTime") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "CreateTime") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *GoogleCloudBeyondcorpPartnerservicesV1alphaPartnerTenant) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudBeyondcorpPartnerservicesV1alphaPartnerTenant + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // GoogleCloudBeyondcorpPartnerservicesV1alphaProxyConfig: Proxy // Configuration of a Tenant. type GoogleCloudBeyondcorpPartnerservicesV1alphaProxyConfig struct { - // AuthenticationInfo: Optional. Information to facilitate - // Authentication against the proxy server. - AuthenticationInfo *GoogleCloudBeyondcorpPartnerservicesV1alphaAuthenticationInfo `json:"authenticationInfo,omitempty"` - // CreateTime: Output only. Timestamp when the resource was created. CreateTime string `json:"createTime,omitempty"` @@ -2751,6 +2818,10 @@ type GoogleCloudBeyondcorpPartnerservicesV1alphaProxyConfig struct { // ProxyConfig. Cannot exceed 64 characters. DisplayName string `json:"displayName,omitempty"` + // EncryptionInfo: Optional. Information to encrypt JWT for the proxy + // server. + EncryptionInfo *GoogleCloudBeyondcorpPartnerservicesV1alphaEncryptionInfo `json:"encryptionInfo,omitempty"` + // Name: Output only. ProxyConfig resource name. Name string `json:"name,omitempty"` @@ -2773,21 +2844,20 @@ type GoogleCloudBeyondcorpPartnerservicesV1alphaProxyConfig struct { // server. googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "AuthenticationInfo") - // to unconditionally include in API requests. By default, fields with + // ForceSendFields is a list of field names (e.g. "CreateTime") to + // unconditionally include in API requests. By default, fields with // empty or default values are omitted from API requests. However, any // non-pointer, non-interface field appearing in ForceSendFields will be // sent to the server regardless of whether the field is empty or not. // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "AuthenticationInfo") to - // include in API requests with the JSON null value. By default, fields - // with empty values are omitted from API requests. However, any field - // with an empty value appearing in NullFields will be sent to the - // server as null. It is an error if a field in this list has a - // non-empty value. This may be used to include null fields in Patch - // requests. + // NullFields is a list of field names (e.g. "CreateTime") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. NullFields []string `json:"-"` } @@ -4818,6 +4888,325 @@ func (s *Tunnelv1ProtoTunnelerInfo) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// method id "beyondcorp.organizations.locations.global.partnerTenants.create": + +type OrganizationsLocationsGlobalPartnerTenantsCreateCall struct { + s *Service + parent string + googlecloudbeyondcorppartnerservicesv1alphapartnertenant *GoogleCloudBeyondcorpPartnerservicesV1alphaPartnerTenant + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Create: Creates a new BeyondCorp Enterprise partnerTenant in a given +// organization and can only be called by onboarded BeyondCorp +// Enterprise partner. +// +// - parent: The resource name of the PartnerTenant using the form: +// `organizations/{organization_id}/locations/global`. +func (r *OrganizationsLocationsGlobalPartnerTenantsService) Create(parent string, googlecloudbeyondcorppartnerservicesv1alphapartnertenant *GoogleCloudBeyondcorpPartnerservicesV1alphaPartnerTenant) *OrganizationsLocationsGlobalPartnerTenantsCreateCall { + c := &OrganizationsLocationsGlobalPartnerTenantsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + c.googlecloudbeyondcorppartnerservicesv1alphapartnertenant = googlecloudbeyondcorppartnerservicesv1alphapartnertenant + return c +} + +// RequestId sets the optional parameter "requestId": An optional +// request ID to identify requests. Specify a unique request ID so that +// if you must retry your request, the server will know to ignore the +// request if it has already been completed. The server will guarantee +// that for at least 60 minutes since the first request. For example, +// consider a situation where you make an initial request and the +// request times out. If you make the request again with the same +// request ID, the server can check if original operation with the same +// request ID was received, and if so, will ignore the second request. +// This prevents clients from accidentally creating duplicate +// commitments. The request ID must be a valid UUID with the exception +// that zero UUID is not supported +// (00000000-0000-0000-0000-000000000000). +func (c *OrganizationsLocationsGlobalPartnerTenantsCreateCall) RequestId(requestId string) *OrganizationsLocationsGlobalPartnerTenantsCreateCall { + c.urlParams_.Set("requestId", requestId) + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *OrganizationsLocationsGlobalPartnerTenantsCreateCall) Fields(s ...googleapi.Field) *OrganizationsLocationsGlobalPartnerTenantsCreateCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *OrganizationsLocationsGlobalPartnerTenantsCreateCall) Context(ctx context.Context) *OrganizationsLocationsGlobalPartnerTenantsCreateCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *OrganizationsLocationsGlobalPartnerTenantsCreateCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *OrganizationsLocationsGlobalPartnerTenantsCreateCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudbeyondcorppartnerservicesv1alphapartnertenant) + if err != nil { + return nil, err + } + reqHeaders.Set("Content-Type", "application/json") + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+parent}/partnerTenants") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("POST", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "parent": c.parent, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "beyondcorp.organizations.locations.global.partnerTenants.create" call. +// Exactly one of *GoogleLongrunningOperation or error will be non-nil. +// Any non-2xx status code is an error. Response headers are in either +// *GoogleLongrunningOperation.ServerResponse.Header or (if a response +// was returned at all) in error.(*googleapi.Error).Header. Use +// googleapi.IsNotModified to check whether the returned error was +// because http.StatusNotModified was returned. +func (c *OrganizationsLocationsGlobalPartnerTenantsCreateCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, gensupport.WrapError(&googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + }) + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, gensupport.WrapError(err) + } + ret := &GoogleLongrunningOperation{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Creates a new BeyondCorp Enterprise partnerTenant in a given organization and can only be called by onboarded BeyondCorp Enterprise partner.", + // "flatPath": "v1alpha/organizations/{organizationsId}/locations/global/partnerTenants", + // "httpMethod": "POST", + // "id": "beyondcorp.organizations.locations.global.partnerTenants.create", + // "parameterOrder": [ + // "parent" + // ], + // "parameters": { + // "parent": { + // "description": "Required. The resource name of the PartnerTenant using the form: `organizations/{organization_id}/locations/global`", + // "location": "path", + // "pattern": "^organizations/[^/]+/locations/global$", + // "required": true, + // "type": "string" + // }, + // "requestId": { + // "description": "Optional. An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. The server will guarantee that for at least 60 minutes since the first request. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", + // "location": "query", + // "type": "string" + // } + // }, + // "path": "v1alpha/{+parent}/partnerTenants", + // "request": { + // "$ref": "GoogleCloudBeyondcorpPartnerservicesV1alphaPartnerTenant" + // }, + // "response": { + // "$ref": "GoogleLongrunningOperation" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "beyondcorp.organizations.locations.global.partnerTenants.get": + +type OrganizationsLocationsGlobalPartnerTenantsGetCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// Get: Gets details of a single PartnerTenant. +// +// - name: The resource name of the PartnerTenant using the form: +// `organizations/{organization_id}/locations/global/partnerTenants/{pa +// rtner_tenant_id}`. +func (r *OrganizationsLocationsGlobalPartnerTenantsService) Get(name string) *OrganizationsLocationsGlobalPartnerTenantsGetCall { + c := &OrganizationsLocationsGlobalPartnerTenantsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *OrganizationsLocationsGlobalPartnerTenantsGetCall) Fields(s ...googleapi.Field) *OrganizationsLocationsGlobalPartnerTenantsGetCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// IfNoneMatch sets the optional parameter which makes the operation +// fail if the object's ETag matches the given value. This is useful for +// getting updates only after the object has changed since the last +// request. Use googleapi.IsNotModified to check whether the response +// error from Do is the result of In-None-Match. +func (c *OrganizationsLocationsGlobalPartnerTenantsGetCall) IfNoneMatch(entityTag string) *OrganizationsLocationsGlobalPartnerTenantsGetCall { + c.ifNoneMatch_ = entityTag + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *OrganizationsLocationsGlobalPartnerTenantsGetCall) Context(ctx context.Context) *OrganizationsLocationsGlobalPartnerTenantsGetCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *OrganizationsLocationsGlobalPartnerTenantsGetCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *OrganizationsLocationsGlobalPartnerTenantsGetCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) + } + var body io.Reader = nil + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+name}") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("GET", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "name": c.name, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "beyondcorp.organizations.locations.global.partnerTenants.get" call. +// Exactly one of +// *GoogleCloudBeyondcorpPartnerservicesV1alphaPartnerTenant or error +// will be non-nil. Any non-2xx status code is an error. Response +// headers are in either +// *GoogleCloudBeyondcorpPartnerservicesV1alphaPartnerTenant.ServerRespon +// se.Header or (if a response was returned at all) in +// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check +// whether the returned error was because http.StatusNotModified was +// returned. +func (c *OrganizationsLocationsGlobalPartnerTenantsGetCall) Do(opts ...googleapi.CallOption) (*GoogleCloudBeyondcorpPartnerservicesV1alphaPartnerTenant, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, gensupport.WrapError(&googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + }) + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, gensupport.WrapError(err) + } + ret := &GoogleCloudBeyondcorpPartnerservicesV1alphaPartnerTenant{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Gets details of a single PartnerTenant.", + // "flatPath": "v1alpha/organizations/{organizationsId}/locations/global/partnerTenants/{partnerTenantsId}", + // "httpMethod": "GET", + // "id": "beyondcorp.organizations.locations.global.partnerTenants.get", + // "parameterOrder": [ + // "name" + // ], + // "parameters": { + // "name": { + // "description": "Required. The resource name of the PartnerTenant using the form: `organizations/{organization_id}/locations/global/partnerTenants/{partner_tenant_id}`", + // "location": "path", + // "pattern": "^organizations/[^/]+/locations/global/partnerTenants/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1alpha/{+name}", + // "response": { + // "$ref": "GoogleCloudBeyondcorpPartnerservicesV1alphaPartnerTenant" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + // method id "beyondcorp.organizations.locations.global.tenants.create": type OrganizationsLocationsGlobalTenantsCreateCall struct { @@ -5148,8 +5537,8 @@ type OrganizationsLocationsGlobalTenantsProxyConfigsCreateCall struct { } // Create: Creates a new BeyondCorp Enterprise ProxyConfiguration in a -// given organization and tenant. Can only be called by on onboarded -// Beyondcorp Enterprise partner. +// given organization and PartnerTenant. Can only be called by on +// onboarded Beyondcorp Enterprise partner. // // - parent: The resource name of the ProxyConfig using the form: // `organizations/{organization_id}/locations/global/tenants/{tenant_id @@ -5270,7 +5659,7 @@ func (c *OrganizationsLocationsGlobalTenantsProxyConfigsCreateCall) Do(opts ...g } return ret, nil // { - // "description": "Creates a new BeyondCorp Enterprise ProxyConfiguration in a given organization and tenant. Can only be called by on onboarded Beyondcorp Enterprise partner.", + // "description": "Creates a new BeyondCorp Enterprise ProxyConfiguration in a given organization and PartnerTenant. Can only be called by on onboarded Beyondcorp Enterprise partner.", // "flatPath": "v1alpha/organizations/{organizationsId}/locations/global/tenants/{tenantsId}/proxyConfigs", // "httpMethod": "POST", // "id": "beyondcorp.organizations.locations.global.tenants.proxyConfigs.create", @@ -5316,7 +5705,7 @@ type OrganizationsLocationsGlobalTenantsProxyConfigsGetCall struct { header_ http.Header } -// Get: Gets details of a single Tenant. +// Get: Gets details of a single ProxyConfig. // // - name: The resource name of the Tenant using the form: // `organizations/{organization_id}/locations/global/tenants/{tenant_id @@ -5429,7 +5818,7 @@ func (c *OrganizationsLocationsGlobalTenantsProxyConfigsGetCall) Do(opts ...goog } return ret, nil // { - // "description": "Gets details of a single Tenant.", + // "description": "Gets details of a single ProxyConfig.", // "flatPath": "v1alpha/organizations/{organizationsId}/locations/global/tenants/{tenantsId}/proxyConfigs/{proxyConfigsId}", // "httpMethod": "GET", // "id": "beyondcorp.organizations.locations.global.tenants.proxyConfigs.get", diff --git a/clouddeploy/v1/clouddeploy-api.json b/clouddeploy/v1/clouddeploy-api.json index 3f70f75d6f2..ad115ae9a23 100644 --- a/clouddeploy/v1/clouddeploy-api.json +++ b/clouddeploy/v1/clouddeploy-api.json @@ -1451,7 +1451,7 @@ } } }, - "revision": "20230426", + "revision": "20230510", "rootUrl": "https://clouddeploy.googleapis.com/", "schemas": { "AbandonReleaseRequest": { @@ -1933,11 +1933,15 @@ "enum": [ "TYPE_UNSPECIFIED", "TYPE_PUBSUB_NOTIFICATION_FAILURE", + "TYPE_RESOURCE_STATE_CHANGE", + "TYPE_PROCESS_ABORTED", "TYPE_RENDER_STATUES_CHANGE" ], "enumDescriptions": [ "Type is unspecified.", "A Pub/Sub notification failed to be sent.", + "Resource state changed.", + "A process aborted.", "Deprecated: This field is never used. Use release_render log type instead." ], "type": "string" @@ -2375,11 +2379,15 @@ "enum": [ "TYPE_UNSPECIFIED", "TYPE_PUBSUB_NOTIFICATION_FAILURE", + "TYPE_RESOURCE_STATE_CHANGE", + "TYPE_PROCESS_ABORTED", "TYPE_RENDER_STATUES_CHANGE" ], "enumDescriptions": [ "Type is unspecified.", "A Pub/Sub notification failed to be sent.", + "Resource state changed.", + "A process aborted.", "Deprecated: This field is never used. Use release_render log type instead." ], "type": "string" @@ -3049,11 +3057,15 @@ "enum": [ "TYPE_UNSPECIFIED", "TYPE_PUBSUB_NOTIFICATION_FAILURE", + "TYPE_RESOURCE_STATE_CHANGE", + "TYPE_PROCESS_ABORTED", "TYPE_RENDER_STATUES_CHANGE" ], "enumDescriptions": [ "Type is unspecified.", "A Pub/Sub notification failed to be sent.", + "Resource state changed.", + "A process aborted.", "Deprecated: This field is never used. Use release_render log type instead." ], "type": "string" @@ -3324,11 +3336,15 @@ "enum": [ "TYPE_UNSPECIFIED", "TYPE_PUBSUB_NOTIFICATION_FAILURE", + "TYPE_RESOURCE_STATE_CHANGE", + "TYPE_PROCESS_ABORTED", "TYPE_RENDER_STATUES_CHANGE" ], "enumDescriptions": [ "Type is unspecified.", "A Pub/Sub notification failed to be sent.", + "Resource state changed.", + "A process aborted.", "Deprecated: This field is never used. Use release_render log type instead." ], "type": "string" @@ -3662,11 +3678,15 @@ "enum": [ "TYPE_UNSPECIFIED", "TYPE_PUBSUB_NOTIFICATION_FAILURE", + "TYPE_RESOURCE_STATE_CHANGE", + "TYPE_PROCESS_ABORTED", "TYPE_RENDER_STATUES_CHANGE" ], "enumDescriptions": [ "Type is unspecified.", "A Pub/Sub notification failed to be sent.", + "Resource state changed.", + "A process aborted.", "Deprecated: This field is never used. Use release_render log type instead." ], "type": "string" diff --git a/clouddeploy/v1/clouddeploy-gen.go b/clouddeploy/v1/clouddeploy-gen.go index 23e823ad143..a7b515edb9f 100644 --- a/clouddeploy/v1/clouddeploy-gen.go +++ b/clouddeploy/v1/clouddeploy-gen.go @@ -1141,6 +1141,8 @@ type DeliveryPipelineNotificationEvent struct { // "TYPE_UNSPECIFIED" - Type is unspecified. // "TYPE_PUBSUB_NOTIFICATION_FAILURE" - A Pub/Sub notification failed // to be sent. + // "TYPE_RESOURCE_STATE_CHANGE" - Resource state changed. + // "TYPE_PROCESS_ABORTED" - A process aborted. // "TYPE_RENDER_STATUES_CHANGE" - Deprecated: This field is never // used. Use release_render log type instead. Type string `json:"type,omitempty"` @@ -1766,6 +1768,8 @@ type JobRunNotificationEvent struct { // "TYPE_UNSPECIFIED" - Type is unspecified. // "TYPE_PUBSUB_NOTIFICATION_FAILURE" - A Pub/Sub notification failed // to be sent. + // "TYPE_RESOURCE_STATE_CHANGE" - Resource state changed. + // "TYPE_PROCESS_ABORTED" - A process aborted. // "TYPE_RENDER_STATUES_CHANGE" - Deprecated: This field is never // used. Use release_render log type instead. Type string `json:"type,omitempty"` @@ -2866,6 +2870,8 @@ type ReleaseNotificationEvent struct { // "TYPE_UNSPECIFIED" - Type is unspecified. // "TYPE_PUBSUB_NOTIFICATION_FAILURE" - A Pub/Sub notification failed // to be sent. + // "TYPE_RESOURCE_STATE_CHANGE" - Resource state changed. + // "TYPE_PROCESS_ABORTED" - A process aborted. // "TYPE_RENDER_STATUES_CHANGE" - Deprecated: This field is never // used. Use release_render log type instead. Type string `json:"type,omitempty"` @@ -3214,6 +3220,8 @@ type RolloutNotificationEvent struct { // "TYPE_UNSPECIFIED" - Type is unspecified. // "TYPE_PUBSUB_NOTIFICATION_FAILURE" - A Pub/Sub notification failed // to be sent. + // "TYPE_RESOURCE_STATE_CHANGE" - Resource state changed. + // "TYPE_PROCESS_ABORTED" - A process aborted. // "TYPE_RENDER_STATUES_CHANGE" - Deprecated: This field is never // used. Use release_render log type instead. Type string `json:"type,omitempty"` @@ -3771,6 +3779,8 @@ type TargetNotificationEvent struct { // "TYPE_UNSPECIFIED" - Type is unspecified. // "TYPE_PUBSUB_NOTIFICATION_FAILURE" - A Pub/Sub notification failed // to be sent. + // "TYPE_RESOURCE_STATE_CHANGE" - Resource state changed. + // "TYPE_PROCESS_ABORTED" - A process aborted. // "TYPE_RENDER_STATUES_CHANGE" - Deprecated: This field is never // used. Use release_render log type instead. Type string `json:"type,omitempty"` diff --git a/datacatalog/v1/datacatalog-api.json b/datacatalog/v1/datacatalog-api.json index cd736a2e78e..76670e89087 100644 --- a/datacatalog/v1/datacatalog-api.json +++ b/datacatalog/v1/datacatalog-api.json @@ -146,6 +146,16 @@ "location": "query", "type": "string" }, + "location": { + "description": "Location where the lookup should be performed. Required to lookup entry that is not a part of `DPMS` or `DATAPLEX` `integrated_system` using its `fully_qualified_name`. Ignored in other cases.", + "location": "query", + "type": "string" + }, + "project": { + "description": "Project where the lookup should be performed. Required to lookup entry that is not a part of `DPMS` or `DATAPLEX` `integrated_system` using its `fully_qualified_name`. Ignored in other cases.", + "location": "query", + "type": "string" + }, "sqlResource": { "description": "The SQL name of the entry. SQL names are case-sensitive. Examples: * `pubsub.topic.{PROJECT_ID}.{TOPIC_ID}` * `pubsub.topic.{PROJECT_ID}.`\\``{TOPIC.ID.SEPARATED.WITH.DOTS}`\\` * `bigquery.table.{PROJECT_ID}.{DATASET_ID}.{TABLE_ID}` * `bigquery.dataset.{PROJECT_ID}.{DATASET_ID}` * `datacatalog.entry.{PROJECT_ID}.{LOCATION_ID}.{ENTRY_GROUP_ID}.{ENTRY_ID}` Identifiers (`*_ID`) should comply with the [Lexical structure in Standard SQL] (https://cloud.google.com/bigquery/docs/reference/standard-sql/lexical).", "location": "query", @@ -2134,7 +2144,7 @@ } } }, - "revision": "20230421", + "revision": "20230512", "rootUrl": "https://datacatalog.googleapis.com/", "schemas": { "Binding": { diff --git a/datacatalog/v1/datacatalog-gen.go b/datacatalog/v1/datacatalog-gen.go index cb4a84176be..63f6d725b64 100644 --- a/datacatalog/v1/datacatalog-gen.go +++ b/datacatalog/v1/datacatalog-gen.go @@ -4803,6 +4803,24 @@ func (c *EntriesLookupCall) LinkedResource(linkedResource string) *EntriesLookup return c } +// Location sets the optional parameter "location": Location where the +// lookup should be performed. Required to lookup entry that is not a +// part of `DPMS` or `DATAPLEX` `integrated_system` using its +// `fully_qualified_name`. Ignored in other cases. +func (c *EntriesLookupCall) Location(location string) *EntriesLookupCall { + c.urlParams_.Set("location", location) + return c +} + +// Project sets the optional parameter "project": Project where the +// lookup should be performed. Required to lookup entry that is not a +// part of `DPMS` or `DATAPLEX` `integrated_system` using its +// `fully_qualified_name`. Ignored in other cases. +func (c *EntriesLookupCall) Project(project string) *EntriesLookupCall { + c.urlParams_.Set("project", project) + return c +} + // SqlResource sets the optional parameter "sqlResource": The SQL name // of the entry. SQL names are case-sensitive. Examples: * // `pubsub.topic.{PROJECT_ID}.{TOPIC_ID}` * @@ -4930,6 +4948,16 @@ func (c *EntriesLookupCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDataca // "location": "query", // "type": "string" // }, + // "location": { + // "description": "Location where the lookup should be performed. Required to lookup entry that is not a part of `DPMS` or `DATAPLEX` `integrated_system` using its `fully_qualified_name`. Ignored in other cases.", + // "location": "query", + // "type": "string" + // }, + // "project": { + // "description": "Project where the lookup should be performed. Required to lookup entry that is not a part of `DPMS` or `DATAPLEX` `integrated_system` using its `fully_qualified_name`. Ignored in other cases.", + // "location": "query", + // "type": "string" + // }, // "sqlResource": { // "description": "The SQL name of the entry. SQL names are case-sensitive. Examples: * `pubsub.topic.{PROJECT_ID}.{TOPIC_ID}` * `pubsub.topic.{PROJECT_ID}.`\\``{TOPIC.ID.SEPARATED.WITH.DOTS}`\\` * `bigquery.table.{PROJECT_ID}.{DATASET_ID}.{TABLE_ID}` * `bigquery.dataset.{PROJECT_ID}.{DATASET_ID}` * `datacatalog.entry.{PROJECT_ID}.{LOCATION_ID}.{ENTRY_GROUP_ID}.{ENTRY_ID}` Identifiers (`*_ID`) should comply with the [Lexical structure in Standard SQL] (https://cloud.google.com/bigquery/docs/reference/standard-sql/lexical).", // "location": "query", diff --git a/dataform/v1beta1/dataform-api.json b/dataform/v1beta1/dataform-api.json index 60b5b7b7c7c..f88b32a27a9 100644 --- a/dataform/v1beta1/dataform-api.json +++ b/dataform/v1beta1/dataform-api.json @@ -178,6 +178,31 @@ "resources": { "repositories": { "methods": { + "computeAccessTokenStatus": { + "description": "Computes a Repository's Git access token status.", + "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/repositories/{repositoriesId}:computeAccessTokenStatus", + "httpMethod": "GET", + "id": "dataform.projects.locations.repositories.computeAccessTokenStatus", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Required. The repository's name.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/repositories/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1beta1/{+name}:computeAccessTokenStatus", + "response": { + "$ref": "ComputeRepositoryAccessTokenStatusResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, "create": { "description": "Creates a new Repository in a given project and location.", "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/repositories", @@ -1791,7 +1816,7 @@ } } }, - "revision": "20230408", + "revision": "20230512", "rootUrl": "https://dataform.googleapis.com/", "schemas": { "Assertion": { @@ -2083,6 +2108,29 @@ }, "type": "object" }, + "ComputeRepositoryAccessTokenStatusResponse": { + "description": "`ComputeRepositoryAccessTokenStatus` response message.", + "id": "ComputeRepositoryAccessTokenStatusResponse", + "properties": { + "tokenStatus": { + "description": "Indicates the status of the Git access token.", + "enum": [ + "TOKEN_STATUS_UNSPECIFIED", + "NOT_FOUND", + "INVALID", + "VALID" + ], + "enumDescriptions": [ + "Default value. This value is unused.", + "The token could not be found in Secret Manager (or the Dataform Service Account did not have permission to access it).", + "The token could not be used to authenticate against the Git remote.", + "The token was used successfully to authenticate against the Git remote." + ], + "type": "string" + } + }, + "type": "object" + }, "Declaration": { "description": "Represents a relation which is not managed by Dataform but which may be referenced by Dataform actions.", "id": "Declaration", @@ -2501,7 +2549,7 @@ "type": "object" }, "Location": { - "description": "A resource that represents Google Cloud Platform location.", + "description": "A resource that represents a Google Cloud location.", "id": "Location", "properties": { "displayName": { diff --git a/dataform/v1beta1/dataform-gen.go b/dataform/v1beta1/dataform-gen.go index 9a8e6c80ab6..cc8deff486c 100644 --- a/dataform/v1beta1/dataform-gen.go +++ b/dataform/v1beta1/dataform-gen.go @@ -715,6 +715,48 @@ func (s *CompilationResultAction) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// ComputeRepositoryAccessTokenStatusResponse: +// `ComputeRepositoryAccessTokenStatus` response message. +type ComputeRepositoryAccessTokenStatusResponse struct { + // TokenStatus: Indicates the status of the Git access token. + // + // Possible values: + // "TOKEN_STATUS_UNSPECIFIED" - Default value. This value is unused. + // "NOT_FOUND" - The token could not be found in Secret Manager (or + // the Dataform Service Account did not have permission to access it). + // "INVALID" - The token could not be used to authenticate against the + // Git remote. + // "VALID" - The token was used successfully to authenticate against + // the Git remote. + TokenStatus string `json:"tokenStatus,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the + // server. + googleapi.ServerResponse `json:"-"` + + // ForceSendFields is a list of field names (e.g. "TokenStatus") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "TokenStatus") to include + // in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. However, any field with + // an empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *ComputeRepositoryAccessTokenStatusResponse) MarshalJSON() ([]byte, error) { + type NoMethod ComputeRepositoryAccessTokenStatusResponse + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // Declaration: Represents a relation which is not managed by Dataform // but which may be referenced by Dataform actions. type Declaration struct { @@ -1470,7 +1512,7 @@ func (s *ListWorkspacesResponse) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// Location: A resource that represents Google Cloud Platform location. +// Location: A resource that represents a Google Cloud location. type Location struct { // DisplayName: The friendly name for this location, typically a nearby // city name. For example, "Tokyo". @@ -3341,6 +3383,155 @@ func (c *ProjectsLocationsListCall) Pages(ctx context.Context, f func(*ListLocat } } +// method id "dataform.projects.locations.repositories.computeAccessTokenStatus": + +type ProjectsLocationsRepositoriesComputeAccessTokenStatusCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// ComputeAccessTokenStatus: Computes a Repository's Git access token +// status. +// +// - name: The repository's name. +func (r *ProjectsLocationsRepositoriesService) ComputeAccessTokenStatus(name string) *ProjectsLocationsRepositoriesComputeAccessTokenStatusCall { + c := &ProjectsLocationsRepositoriesComputeAccessTokenStatusCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *ProjectsLocationsRepositoriesComputeAccessTokenStatusCall) Fields(s ...googleapi.Field) *ProjectsLocationsRepositoriesComputeAccessTokenStatusCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// IfNoneMatch sets the optional parameter which makes the operation +// fail if the object's ETag matches the given value. This is useful for +// getting updates only after the object has changed since the last +// request. Use googleapi.IsNotModified to check whether the response +// error from Do is the result of In-None-Match. +func (c *ProjectsLocationsRepositoriesComputeAccessTokenStatusCall) IfNoneMatch(entityTag string) *ProjectsLocationsRepositoriesComputeAccessTokenStatusCall { + c.ifNoneMatch_ = entityTag + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *ProjectsLocationsRepositoriesComputeAccessTokenStatusCall) Context(ctx context.Context) *ProjectsLocationsRepositoriesComputeAccessTokenStatusCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *ProjectsLocationsRepositoriesComputeAccessTokenStatusCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsRepositoriesComputeAccessTokenStatusCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) + } + var body io.Reader = nil + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+name}:computeAccessTokenStatus") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("GET", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "name": c.name, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "dataform.projects.locations.repositories.computeAccessTokenStatus" call. +// Exactly one of *ComputeRepositoryAccessTokenStatusResponse or error +// will be non-nil. Any non-2xx status code is an error. Response +// headers are in either +// *ComputeRepositoryAccessTokenStatusResponse.ServerResponse.Header or +// (if a response was returned at all) in +// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check +// whether the returned error was because http.StatusNotModified was +// returned. +func (c *ProjectsLocationsRepositoriesComputeAccessTokenStatusCall) Do(opts ...googleapi.CallOption) (*ComputeRepositoryAccessTokenStatusResponse, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, gensupport.WrapError(&googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + }) + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, gensupport.WrapError(err) + } + ret := &ComputeRepositoryAccessTokenStatusResponse{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Computes a Repository's Git access token status.", + // "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/repositories/{repositoriesId}:computeAccessTokenStatus", + // "httpMethod": "GET", + // "id": "dataform.projects.locations.repositories.computeAccessTokenStatus", + // "parameterOrder": [ + // "name" + // ], + // "parameters": { + // "name": { + // "description": "Required. The repository's name.", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+/repositories/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1beta1/{+name}:computeAccessTokenStatus", + // "response": { + // "$ref": "ComputeRepositoryAccessTokenStatusResponse" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + // method id "dataform.projects.locations.repositories.create": type ProjectsLocationsRepositoriesCreateCall struct { diff --git a/drive/v3/drive-api.json b/drive/v3/drive-api.json index 9e8ba82bdcd..8b36adef0b6 100644 --- a/drive/v3/drive-api.json +++ b/drive/v3/drive-api.json @@ -29,62 +29,35 @@ } } }, - "basePath": "", - "baseUrl": "https://www.googleapis.com/", + "basePath": "/drive/v3/", + "baseUrl": "https://www.googleapis.com/drive/v3/", "batchPath": "batch/drive/v3", - "description": "The Google Drive API allows clients to access resources from Google Drive.", + "description": "Manages files in Drive including uploading, downloading, searching, detecting changes, and updating sharing permissions.", "discoveryVersion": "v1", "documentationLink": "https://developers.google.com/drive/", + "etag": "\"VYc8DWo_6wRTElVugbtvWfkARsc/Rbg-qVi5IMtZXkfgFBOCN9uNluk\"", "icons": { - "x16": "http://www.google.com/images/icons/product/search-16.gif", - "x32": "http://www.google.com/images/icons/product/search-32.gif" + "x16": "https://ssl.gstatic.com/docs/doclist/images/drive_icon_16.png", + "x32": "https://ssl.gstatic.com/docs/doclist/images/drive_icon_32.png" }, "id": "drive:v3", "kind": "discovery#restDescription", - "mtlsRootUrl": "https://www.mtls.googleapis.com/", "name": "drive", "ownerDomain": "google.com", "ownerName": "Google", "parameters": { - "$.xgafv": { - "description": "V1 error format.", - "enum": [ - "1", - "2" - ], - "enumDescriptions": [ - "v1 error format", - "v2 error format" - ], - "location": "query", - "type": "string" - }, - "access_token": { - "description": "OAuth access token.", - "location": "query", - "type": "string" - }, "alt": { "default": "json", - "description": "Data format for response.", + "description": "Data format for the response.", "enum": [ - "json", - "media", - "proto" + "json" ], "enumDescriptions": [ - "Responses with Content-Type of application/json", - "Media download with context-dependent Content-Type", - "Responses with Content-Type of application/x-protobuf" + "Responses with Content-Type of application/json" ], "location": "query", "type": "string" }, - "callback": { - "description": "JSONP", - "location": "query", - "type": "string" - }, "fields": { "description": "Selector specifying which fields to include in a partial response.", "location": "query", @@ -107,17 +80,12 @@ "type": "boolean" }, "quotaUser": { - "description": "Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters.", + "description": "An opaque string that represents a user for quota purposes. Must not exceed 40 characters.", "location": "query", "type": "string" }, - "uploadType": { - "description": "Legacy upload protocol for media (e.g. \"media\", \"multipart\").", - "location": "query", - "type": "string" - }, - "upload_protocol": { - "description": "Upload protocol for media (e.g. \"raw\", \"multipart\").", + "userIp": { + "description": "Deprecated. Please use quotaUser instead.", "location": "query", "type": "string" } @@ -128,12 +96,9 @@ "methods": { "get": { "description": "Gets information about the user, the user's Drive, and system capabilities.", - "flatPath": "drive/v3/about", "httpMethod": "GET", "id": "drive.about.get", - "parameterOrder": [], - "parameters": {}, - "path": "drive/v3/about", + "path": "about", "response": { "$ref": "About" }, @@ -153,13 +118,11 @@ "methods": { "getStartPageToken": { "description": "Gets the starting pageToken for listing future changes.", - "flatPath": "drive/v3/changes/startPageToken", "httpMethod": "GET", "id": "drive.changes.getStartPageToken", - "parameterOrder": [], "parameters": { "driveId": { - "description": "The ID of the shared drive for which the starting pageToken for listing future changes from that shared drive will be returned.", + "description": "The ID of the shared drive for which the starting pageToken for listing future changes from that shared drive is returned.", "location": "query", "type": "string" }, @@ -171,17 +134,17 @@ }, "supportsTeamDrives": { "default": "false", - "description": "Deprecated: Use `supportsAllDrives` instead.", + "description": "Deprecated use supportsAllDrives instead.", "location": "query", "type": "boolean" }, "teamDriveId": { - "description": "Deprecated: Use `driveId` instead.", + "description": "Deprecated use driveId instead.", "location": "query", "type": "string" } }, - "path": "drive/v3/changes/startPageToken", + "path": "changes/startPageToken", "response": { "$ref": "StartPageToken" }, @@ -197,7 +160,6 @@ }, "list": { "description": "Lists the changes for a user or shared drive.", - "flatPath": "drive/v3/changes", "httpMethod": "GET", "id": "drive.changes.list", "parameterOrder": [ @@ -205,7 +167,7 @@ ], "parameters": { "driveId": { - "description": "The shared drive from which changes will be returned. If specified the change IDs will be reflective of the shared drive; use the combined drive ID and change ID as an identifier.", + "description": "The shared drive from which changes are returned. If specified the change IDs will be reflective of the shared drive; use the combined drive ID and change ID as an identifier.", "location": "query", "type": "string" }, @@ -222,7 +184,7 @@ "type": "boolean" }, "includeLabels": { - "description": "A comma-separated list of IDs of labels to include in the `labelInfo` part of the response.", + "description": "A comma-separated list of IDs of labels to include in the labelInfo part of the response.", "location": "query", "type": "string" }, @@ -239,7 +201,7 @@ }, "includeTeamDriveItems": { "default": "false", - "description": "Deprecated: Use `includeItemsFromAllDrives` instead.", + "description": "Deprecated use includeItemsFromAllDrives instead.", "location": "query", "type": "boolean" }, @@ -278,17 +240,17 @@ }, "supportsTeamDrives": { "default": "false", - "description": "Deprecated: Use `supportsAllDrives` instead.", + "description": "Deprecated use supportsAllDrives instead.", "location": "query", "type": "boolean" }, "teamDriveId": { - "description": "Deprecated: Use `driveId` instead.", + "description": "Deprecated use driveId instead.", "location": "query", "type": "string" } }, - "path": "drive/v3/changes", + "path": "changes", "response": { "$ref": "ChangeList" }, @@ -304,8 +266,7 @@ "supportsSubscription": true }, "watch": { - "description": "Subscribes to changes for a user.", - "flatPath": "drive/v3/changes/watch", + "description": "Subscribes to changes for a user. To use this method, you must include the pageToken query parameter.", "httpMethod": "POST", "id": "drive.changes.watch", "parameterOrder": [ @@ -313,7 +274,7 @@ ], "parameters": { "driveId": { - "description": "The shared drive from which changes will be returned. If specified the change IDs will be reflective of the shared drive; use the combined drive ID and change ID as an identifier.", + "description": "The shared drive from which changes are returned. If specified the change IDs will be reflective of the shared drive; use the combined drive ID and change ID as an identifier.", "location": "query", "type": "string" }, @@ -330,7 +291,7 @@ "type": "boolean" }, "includeLabels": { - "description": "A comma-separated list of IDs of labels to include in the `labelInfo` part of the response.", + "description": "A comma-separated list of IDs of labels to include in the labelInfo part of the response.", "location": "query", "type": "string" }, @@ -347,7 +308,7 @@ }, "includeTeamDriveItems": { "default": "false", - "description": "Deprecated: Use `includeItemsFromAllDrives` instead.", + "description": "Deprecated use includeItemsFromAllDrives instead.", "location": "query", "type": "boolean" }, @@ -386,17 +347,17 @@ }, "supportsTeamDrives": { "default": "false", - "description": "Deprecated: Use `supportsAllDrives` instead.", + "description": "Deprecated use supportsAllDrives instead.", "location": "query", "type": "boolean" }, "teamDriveId": { - "description": "Deprecated: Use `driveId` instead.", + "description": "Deprecated use driveId instead.", "location": "query", "type": "string" } }, - "path": "drive/v3/changes/watch", + "path": "changes/watch", "request": { "$ref": "Channel", "parameterName": "resource" @@ -420,13 +381,10 @@ "channels": { "methods": { "stop": { - "description": "Stop watching resources through this channel.", - "flatPath": "drive/v3/channels/stop", + "description": "Stop watching resources through this channel", "httpMethod": "POST", "id": "drive.channels.stop", - "parameterOrder": [], - "parameters": {}, - "path": "drive/v3/channels/stop", + "path": "channels/stop", "request": { "$ref": "Channel", "parameterName": "resource" @@ -447,7 +405,6 @@ "methods": { "create": { "description": "Creates a comment on a file.", - "flatPath": "drive/v3/files/{fileId}/comments", "httpMethod": "POST", "id": "drive.comments.create", "parameterOrder": [ @@ -461,7 +418,7 @@ "type": "string" } }, - "path": "drive/v3/files/{fileId}/comments", + "path": "files/{fileId}/comments", "request": { "$ref": "Comment" }, @@ -475,7 +432,6 @@ }, "delete": { "description": "Deletes a comment.", - "flatPath": "drive/v3/files/{fileId}/comments/{commentId}", "httpMethod": "DELETE", "id": "drive.comments.delete", "parameterOrder": [ @@ -496,7 +452,7 @@ "type": "string" } }, - "path": "drive/v3/files/{fileId}/comments/{commentId}", + "path": "files/{fileId}/comments/{commentId}", "scopes": [ "https://www.googleapis.com/auth/drive", "https://www.googleapis.com/auth/drive.file" @@ -504,7 +460,6 @@ }, "get": { "description": "Gets a comment by ID.", - "flatPath": "drive/v3/files/{fileId}/comments/{commentId}", "httpMethod": "GET", "id": "drive.comments.get", "parameterOrder": [ @@ -531,7 +486,7 @@ "type": "boolean" } }, - "path": "drive/v3/files/{fileId}/comments/{commentId}", + "path": "files/{fileId}/comments/{commentId}", "response": { "$ref": "Comment" }, @@ -543,7 +498,6 @@ }, "list": { "description": "Lists a file's comments.", - "flatPath": "drive/v3/files/{fileId}/comments", "httpMethod": "GET", "id": "drive.comments.list", "parameterOrder": [ @@ -582,7 +536,7 @@ "type": "string" } }, - "path": "drive/v3/files/{fileId}/comments", + "path": "files/{fileId}/comments", "response": { "$ref": "CommentList" }, @@ -594,7 +548,6 @@ }, "update": { "description": "Updates a comment with patch semantics.", - "flatPath": "drive/v3/files/{fileId}/comments/{commentId}", "httpMethod": "PATCH", "id": "drive.comments.update", "parameterOrder": [ @@ -615,7 +568,7 @@ "type": "string" } }, - "path": "drive/v3/files/{fileId}/comments/{commentId}", + "path": "files/{fileId}/comments/{commentId}", "request": { "$ref": "Comment" }, @@ -633,7 +586,6 @@ "methods": { "create": { "description": "Creates a shared drive.", - "flatPath": "drive/v3/drives", "httpMethod": "POST", "id": "drive.drives.create", "parameterOrder": [ @@ -647,7 +599,7 @@ "type": "string" } }, - "path": "drive/v3/drives", + "path": "drives", "request": { "$ref": "Drive" }, @@ -660,7 +612,6 @@ }, "delete": { "description": "Permanently deletes a shared drive for which the user is an organizer. The shared drive cannot contain any untrashed items.", - "flatPath": "drive/v3/drives/{driveId}", "httpMethod": "DELETE", "id": "drive.drives.delete", "parameterOrder": [ @@ -669,7 +620,7 @@ "parameters": { "allowItemDeletion": { "default": "false", - "description": "Whether any items inside the shared drive should also be deleted. This option is only supported when `useDomainAdminAccess` is also set to `true`.", + "description": "Whether any items inside the shared drive should also be deleted. This option is only supported when useDomainAdminAccess is also set to true.", "location": "query", "type": "boolean" }, @@ -686,14 +637,13 @@ "type": "boolean" } }, - "path": "drive/v3/drives/{driveId}", + "path": "drives/{driveId}", "scopes": [ "https://www.googleapis.com/auth/drive" ] }, "get": { "description": "Gets a shared drive's metadata by ID.", - "flatPath": "drive/v3/drives/{driveId}", "httpMethod": "GET", "id": "drive.drives.get", "parameterOrder": [ @@ -713,7 +663,7 @@ "type": "boolean" } }, - "path": "drive/v3/drives/{driveId}", + "path": "drives/{driveId}", "response": { "$ref": "Drive" }, @@ -724,7 +674,6 @@ }, "hide": { "description": "Hides a shared drive from the default view.", - "flatPath": "drive/v3/drives/{driveId}/hide", "httpMethod": "POST", "id": "drive.drives.hide", "parameterOrder": [ @@ -738,7 +687,7 @@ "type": "string" } }, - "path": "drive/v3/drives/{driveId}/hide", + "path": "drives/{driveId}/hide", "response": { "$ref": "Drive" }, @@ -747,11 +696,9 @@ ] }, "list": { - "description": " Lists the user's shared drives. This method accepts the `q` parameter, which is a search query combining one or more search terms. For more information, see the [Search for shared drives](/drive/api/guides/search-shareddrives) guide.", - "flatPath": "drive/v3/drives", + "description": "Lists the user's shared drives.", "httpMethod": "GET", "id": "drive.drives.list", - "parameterOrder": [], "parameters": { "pageSize": { "default": "10", @@ -779,7 +726,7 @@ "type": "boolean" } }, - "path": "drive/v3/drives", + "path": "drives", "response": { "$ref": "DriveList" }, @@ -790,7 +737,6 @@ }, "unhide": { "description": "Restores a shared drive to the default view.", - "flatPath": "drive/v3/drives/{driveId}/unhide", "httpMethod": "POST", "id": "drive.drives.unhide", "parameterOrder": [ @@ -804,7 +750,7 @@ "type": "string" } }, - "path": "drive/v3/drives/{driveId}/unhide", + "path": "drives/{driveId}/unhide", "response": { "$ref": "Drive" }, @@ -813,8 +759,7 @@ ] }, "update": { - "description": "Updates the metadate for a shared drive.", - "flatPath": "drive/v3/drives/{driveId}", + "description": "Updates the metadata for a shared drive.", "httpMethod": "PATCH", "id": "drive.drives.update", "parameterOrder": [ @@ -829,12 +774,12 @@ }, "useDomainAdminAccess": { "default": "false", - "description": "Issue the request as a domain administrator; if set to true, then the requester will be granted access if they are an administrator of the domain to which the shared drive belongs.", + "description": "Issue the request as a domain administrator. If set to true, then the requester is granted access if they're an administrator of the domain to which the shared drive belongs.", "location": "query", "type": "boolean" } }, - "path": "drive/v3/drives/{driveId}", + "path": "drives/{driveId}", "request": { "$ref": "Drive" }, @@ -850,8 +795,7 @@ "files": { "methods": { "copy": { - "description": "Creates a copy of a file and applies any requested updates with patch semantics.", - "flatPath": "drive/v3/files/{fileId}/copy", + "description": "Creates a copy of a file and applies any requested updates with patch semantics. Folders cannot be copied.", "httpMethod": "POST", "id": "drive.files.copy", "parameterOrder": [ @@ -877,7 +821,7 @@ "type": "boolean" }, "includeLabels": { - "description": "A comma-separated list of IDs of labels to include in the `labelInfo` part of the response.", + "description": "A comma-separated list of IDs of labels to include in the labelInfo part of the response.", "location": "query", "type": "string" }, @@ -905,12 +849,12 @@ }, "supportsTeamDrives": { "default": "false", - "description": "Deprecated: Use `supportsAllDrives` instead.", + "description": "Deprecated use supportsAllDrives instead.", "location": "query", "type": "boolean" } }, - "path": "drive/v3/files/{fileId}/copy", + "path": "files/{fileId}/copy", "request": { "$ref": "File" }, @@ -925,15 +869,14 @@ ] }, "create": { - "description": " Creates a new file. This method supports an */upload* URI and accepts uploaded media with the following characteristics: - *Maximum file size:* 5120GB - *Accepted Media MIME types:*`*/*` Note: Specify a valid MIME type, rather than the literal `*/*` value. The literal `*/*` is only used to indicate that any valid MIME type can be uploaded. For further information on uploading files, refer to [Upload files](/drive/api/guides/manage-uploads). Apps creating shortcuts with `files.create` must specify the MIME type `application/vnd.google-apps.shortcut`. Apps should specify a file extension in the `name` property when inserting files with the API. For example, an operation to insert a JPEG file should specify something like `\"name\": \"cat.jpg\"` in the metadata. Subsequent `GET` requests include the read-only `fileExtension` property populated with the extension originally specified in the `title` property. When a Google Drive user requests to download a file, or when the file is downloaded through the sync client, Drive builds a full filename (with extension) based on the title. In cases where the extension is missing, Google Drive attempts to determine the extension based on the file's MIME type.", - "flatPath": "drive/v3/files", + "description": "Creates a file.", "httpMethod": "POST", "id": "drive.files.create", "mediaUpload": { "accept": [ "*/*" ], - "maxSize": "5497558138880", + "maxSize": "5120GB", "protocols": { "resumable": { "multipart": true, @@ -945,7 +888,6 @@ } } }, - "parameterOrder": [], "parameters": { "enforceSingleParent": { "default": "false", @@ -960,7 +902,7 @@ "type": "boolean" }, "includeLabels": { - "description": "A comma-separated list of IDs of labels to include in the `labelInfo` part of the response.", + "description": "A comma-separated list of IDs of labels to include in the labelInfo part of the response.", "location": "query", "type": "string" }, @@ -988,7 +930,7 @@ }, "supportsTeamDrives": { "default": "false", - "description": "Deprecated: Use `supportsAllDrives` instead.", + "description": "Deprecated use supportsAllDrives instead.", "location": "query", "type": "boolean" }, @@ -999,7 +941,7 @@ "type": "boolean" } }, - "path": "drive/v3/files", + "path": "files", "request": { "$ref": "File" }, @@ -1011,11 +953,11 @@ "https://www.googleapis.com/auth/drive.appdata", "https://www.googleapis.com/auth/drive.file" ], - "supportsMediaUpload": true + "supportsMediaUpload": true, + "supportsSubscription": true }, "delete": { "description": "Permanently deletes a file owned by the user without moving it to the trash. If the file belongs to a shared drive the user must be an organizer on the parent. If the target is a folder, all descendants owned by the user are also deleted.", - "flatPath": "drive/v3/files/{fileId}", "httpMethod": "DELETE", "id": "drive.files.delete", "parameterOrder": [ @@ -1024,7 +966,7 @@ "parameters": { "enforceSingleParent": { "default": "false", - "description": "Deprecated: If an item is not in a shared drive and its last parent is deleted but the item itself is not, the item will be placed under its owner's root.", + "description": "Deprecated. If an item is not in a shared drive and its last parent is deleted but the item itself is not, the item will be placed under its owner's root.", "location": "query", "type": "boolean" }, @@ -1042,12 +984,12 @@ }, "supportsTeamDrives": { "default": "false", - "description": "Deprecated: Use `supportsAllDrives` instead.", + "description": "Deprecated use supportsAllDrives instead.", "location": "query", "type": "boolean" } }, - "path": "drive/v3/files/{fileId}", + "path": "files/{fileId}", "scopes": [ "https://www.googleapis.com/auth/drive", "https://www.googleapis.com/auth/drive.appdata", @@ -1055,11 +997,9 @@ ] }, "emptyTrash": { - "description": "Permanently deletes all of the user's trashed files.", - "flatPath": "drive/v3/files/trash", + "description": "Permanently deletes all trashed files of a user or shared drive.", "httpMethod": "DELETE", "id": "drive.files.emptyTrash", - "parameterOrder": [], "parameters": { "driveId": { "description": "If set, empties the trash of the provided shared drive.", @@ -1068,19 +1008,18 @@ }, "enforceSingleParent": { "default": "false", - "description": "Deprecated: If an item is not in a shared drive and its last parent is deleted but the item itself is not, the item will be placed under its owner's root.", + "description": "Deprecated. If an item is not in a shared drive and its last parent is deleted but the item itself is not, the item will be placed under its owner's root.", "location": "query", "type": "boolean" } }, - "path": "drive/v3/files/trash", + "path": "files/trash", "scopes": [ "https://www.googleapis.com/auth/drive" ] }, "export": { "description": "Exports a Google Workspace document to the requested MIME type and returns exported byte content. Note that the exported content is limited to 10MB.", - "flatPath": "drive/v3/files/{fileId}/export", "httpMethod": "GET", "id": "drive.files.export", "parameterOrder": [ @@ -1101,21 +1040,18 @@ "type": "string" } }, - "path": "drive/v3/files/{fileId}/export", + "path": "files/{fileId}/export", "scopes": [ "https://www.googleapis.com/auth/drive", "https://www.googleapis.com/auth/drive.file", "https://www.googleapis.com/auth/drive.readonly" ], - "supportsMediaDownload": true, - "useMediaDownloadService": true + "supportsMediaDownload": true }, "generateIds": { "description": "Generates a set of file IDs which can be provided in create or copy requests.", - "flatPath": "drive/v3/files/generateIds", "httpMethod": "GET", "id": "drive.files.generateIds", - "parameterOrder": [], "parameters": { "count": { "default": "10", @@ -1134,12 +1070,12 @@ }, "type": { "default": "files", - "description": "The type of items which the IDs can be used for. Supported values are 'files' and 'shortcuts'. Note that 'shortcuts' are only supported in the `drive` 'space'. (Default: 'files')", + "description": "The type of items which the IDs can be used for. Supported values are 'files' and 'shortcuts'. Note that 'shortcuts' are only supported in the drive 'space'. (Default: 'files')", "location": "query", "type": "string" } }, - "path": "drive/v3/files/generateIds", + "path": "files/generateIds", "response": { "$ref": "GeneratedIds" }, @@ -1150,8 +1086,7 @@ ] }, "get": { - "description": " Gets a file's metadata or content by ID. If you provide the URL parameter `alt=media`, then the response includes the file contents in the response body. Downloading content with `alt=media` only works if the file is stored in Drive. To download Google Docs, Sheets, and Slides use [`files.export`](/drive/api/reference/rest/v3/files/export) instead. For further information on downloading files, refer to [Download files](/drive/api/guides/manage-downloads).", - "flatPath": "drive/v3/files/{fileId}", + "description": "Gets a file's metadata or content by ID.", "httpMethod": "GET", "id": "drive.files.get", "parameterOrder": [ @@ -1171,7 +1106,7 @@ "type": "string" }, "includeLabels": { - "description": "A comma-separated list of IDs of labels to include in the `labelInfo` part of the response.", + "description": "A comma-separated list of IDs of labels to include in the labelInfo part of the response.", "location": "query", "type": "string" }, @@ -1188,12 +1123,12 @@ }, "supportsTeamDrives": { "default": "false", - "description": "Deprecated: Use `supportsAllDrives` instead.", + "description": "Deprecated use supportsAllDrives instead.", "location": "query", "type": "boolean" } }, - "path": "drive/v3/files/{fileId}", + "path": "files/{fileId}", "response": { "$ref": "File" }, @@ -1211,26 +1146,24 @@ "useMediaDownloadService": true }, "list": { - "description": " Lists the user's files. This method accepts the `q` parameter, which is a search query combining one or more search terms. For more information, see the [Search for files](/drive/api/guides/search-files) guide. *Note:* This method returns *all* files by default, including trashed files. If you don't want trashed files to appear in the list, use the `trashed=false` query parameter to filter trashed files from the results.", - "flatPath": "drive/v3/files", + "description": "Lists or searches files.", "httpMethod": "GET", "id": "drive.files.list", - "parameterOrder": [], "parameters": { "corpora": { - "description": "Bodies of items (files/documents) to which the query applies. Supported bodies are 'user', 'domain', 'drive' and 'allDrives'. Prefer 'user' or 'drive' to 'allDrives' for efficiency.", + "description": "Groupings of files to which the query applies. Supported groupings are: 'user' (files created by, opened by, or shared directly with the user), 'drive' (files in the specified shared drive as indicated by the 'driveId'), 'domain' (files shared to the user's domain), and 'allDrives' (A combination of 'user' and 'drive' for all drives where the user is a member). When able, use 'user' or 'drive', instead of 'allDrives', for efficiency.", "location": "query", "type": "string" }, "corpus": { - "description": "Deprecated: The source of files to list. Use 'corpora' instead.", + "description": "The source of files to list. Deprecated: use 'corpora' instead.", "enum": [ "domain", "user" ], "enumDescriptions": [ "Files shared to the user's domain.", - "Files owned by or shared to the user." + "Files owned by or shared to the user. If a user has permissions on a Shared Drive, the files inside it won't be retrieved unless the user has created, opened, or shared the file." ], "location": "query", "type": "string" @@ -1247,7 +1180,7 @@ "type": "boolean" }, "includeLabels": { - "description": "A comma-separated list of IDs of labels to include in the `labelInfo` part of the response.", + "description": "A comma-separated list of IDs of labels to include in the labelInfo part of the response.", "location": "query", "type": "string" }, @@ -1258,7 +1191,7 @@ }, "includeTeamDriveItems": { "default": "false", - "description": "Deprecated: Use `includeItemsFromAllDrives` instead.", + "description": "Deprecated use includeItemsFromAllDrives instead.", "location": "query", "type": "boolean" }, @@ -1300,17 +1233,17 @@ }, "supportsTeamDrives": { "default": "false", - "description": "Deprecated: Use `supportsAllDrives` instead.", + "description": "Deprecated use supportsAllDrives instead.", "location": "query", "type": "boolean" }, "teamDriveId": { - "description": "Deprecated: Use `driveId` instead.", + "description": "Deprecated use driveId instead.", "location": "query", "type": "string" } }, - "path": "drive/v3/files", + "path": "files", "response": { "$ref": "FileList" }, @@ -1326,7 +1259,6 @@ }, "listLabels": { "description": "Lists the labels on a file.", - "flatPath": "drive/v3/files/{fileId}/listLabels", "httpMethod": "GET", "id": "drive.files.listLabels", "parameterOrder": [ @@ -1334,14 +1266,14 @@ ], "parameters": { "fileId": { - "description": "The ID for the file or shared drive.", + "description": "The ID of the file.", "location": "path", "required": true, "type": "string" }, "maxResults": { "default": "100", - "description": "The maximum number of labels to return per page. When not set, defaults to 100.", + "description": "The maximum number of labels to return per page. When not set, this defaults to 100.", "format": "int32", "location": "query", "maximum": "100", @@ -1354,7 +1286,7 @@ "type": "string" } }, - "path": "drive/v3/files/{fileId}/listLabels", + "path": "files/{fileId}/listLabels", "response": { "$ref": "LabelList" }, @@ -1367,8 +1299,7 @@ ] }, "modifyLabels": { - "description": "Modifies the set of labels applied to a file. Returns a list of the labels that were added or modified.", - "flatPath": "drive/v3/files/{fileId}/modifyLabels", + "description": "Modifies the set of labels on a file.", "httpMethod": "POST", "id": "drive.files.modifyLabels", "parameterOrder": [ @@ -1376,13 +1307,13 @@ ], "parameters": { "fileId": { - "description": "The ID of the file to which the labels belong.", + "description": "The ID of the file for which the labels are modified.", "location": "path", "required": true, "type": "string" } }, - "path": "drive/v3/files/{fileId}/modifyLabels", + "path": "files/{fileId}/modifyLabels", "request": { "$ref": "ModifyLabelsRequest" }, @@ -1396,15 +1327,14 @@ ] }, "update": { - "description": " Updates a file's metadata and/or content. When calling this method, only populate fields in the request that you want to modify. When updating fields, some fields might be changed automatically, such as `modifiedDate`. This method supports patch semantics. This method supports an */upload* URI and accepts uploaded media with the following characteristics: - *Maximum file size:* 5120GB - *Accepted Media MIME types:*`*/*` Note: Specify a valid MIME type, rather than the literal `*/*` value. The literal `*/*` is only used to indicate that any valid MIME type can be uploaded. For further information on uploading files, refer to [Upload files](/drive/api/guides/manage-uploads).", - "flatPath": "drive/v3/files/{fileId}", + "description": "Updates a file's metadata and/or content. When calling this method, only populate fields in the request that you want to modify. When updating fields, some fields might change automatically, such as modifiedDate. This method supports patch semantics.", "httpMethod": "PATCH", "id": "drive.files.update", "mediaUpload": { "accept": [ "*/*" ], - "maxSize": "5497558138880", + "maxSize": "5120GB", "protocols": { "resumable": { "multipart": true, @@ -1427,7 +1357,7 @@ }, "enforceSingleParent": { "default": "false", - "description": "Deprecated: Adding files to multiple folders is no longer supported. Use shortcuts instead.", + "description": "Deprecated. Adding files to multiple folders is no longer supported. Use shortcuts instead.", "location": "query", "type": "boolean" }, @@ -1438,7 +1368,7 @@ "type": "string" }, "includeLabels": { - "description": "A comma-separated list of IDs of labels to include in the `labelInfo` part of the response.", + "description": "A comma-separated list of IDs of labels to include in the labelInfo part of the response.", "location": "query", "type": "string" }, @@ -1471,7 +1401,7 @@ }, "supportsTeamDrives": { "default": "false", - "description": "Deprecated: Use `supportsAllDrives` instead.", + "description": "Deprecated use supportsAllDrives instead.", "location": "query", "type": "boolean" }, @@ -1482,7 +1412,7 @@ "type": "boolean" } }, - "path": "drive/v3/files/{fileId}", + "path": "files/{fileId}", "request": { "$ref": "File" }, @@ -1499,8 +1429,7 @@ "supportsMediaUpload": true }, "watch": { - "description": "Subscribes to changes to a file.", - "flatPath": "drive/v3/files/{fileId}/watch", + "description": "Subscribe to changes on a file.", "httpMethod": "POST", "id": "drive.files.watch", "parameterOrder": [ @@ -1520,7 +1449,7 @@ "type": "string" }, "includeLabels": { - "description": "A comma-separated list of IDs of labels to include in the `labelInfo` part of the response.", + "description": "A comma-separated list of IDs of labels to include in the labelInfo part of the response.", "location": "query", "type": "string" }, @@ -1537,12 +1466,12 @@ }, "supportsTeamDrives": { "default": "false", - "description": "Deprecated: Use `supportsAllDrives` instead.", + "description": "Deprecated use supportsAllDrives instead.", "location": "query", "type": "boolean" } }, - "path": "drive/v3/files/{fileId}/watch", + "path": "files/{fileId}/watch", "request": { "$ref": "Channel", "parameterName": "resource" @@ -1559,15 +1488,16 @@ "https://www.googleapis.com/auth/drive.photos.readonly", "https://www.googleapis.com/auth/drive.readonly" ], - "supportsSubscription": true + "supportsMediaDownload": true, + "supportsSubscription": true, + "useMediaDownloadService": true } } }, "permissions": { "methods": { "create": { - "description": "Creates a permission for a file or shared drive. **Warning:** Concurrent permissions operations on the same file are not supported; only the last update is applied.", - "flatPath": "drive/v3/files/{fileId}/permissions", + "description": "Creates a permission for a file or shared drive. For more information on creating permissions, see Share files, folders \u0026 drives.", "httpMethod": "POST", "id": "drive.permissions.create", "parameterOrder": [ @@ -1581,7 +1511,7 @@ }, "enforceSingleParent": { "default": "false", - "description": "Deprecated: See `moveToNewOwnersRoot` for details.", + "description": "Deprecated. See moveToNewOwnersRoot for details.", "location": "query", "type": "boolean" }, @@ -1593,7 +1523,7 @@ }, "moveToNewOwnersRoot": { "default": "false", - "description": "This parameter will only take effect if the item is not in a shared drive and the request is attempting to transfer the ownership of the item. If set to `true`, the item will be moved to the new owner's My Drive root folder and all prior parents removed. If set to `false`, parents are not changed.", + "description": "This parameter will only take effect if the item is not in a shared drive and the request is attempting to transfer the ownership of the item. If set to true, the item will be moved to the new owner's My Drive root folder and all prior parents removed. If set to false, parents are not changed.", "location": "query", "type": "boolean" }, @@ -1610,13 +1540,13 @@ }, "supportsTeamDrives": { "default": "false", - "description": "Deprecated: Use `supportsAllDrives` instead.", + "description": "Deprecated use supportsAllDrives instead.", "location": "query", "type": "boolean" }, "transferOwnership": { "default": "false", - "description": "Whether to transfer ownership to the specified user and downgrade the current owner to a writer. This parameter is required as an acknowledgement of the side effect.", + "description": "Whether to transfer ownership to the specified user and downgrade the current owner to a writer. This parameter is required as an acknowledgement of the side effect. File owners can only transfer ownership of files existing on My Drive. Files existing in a shared drive are owned by the organization that owns that shared drive. Ownership transfers are not supported for files and folders in shared drives. Organizers of a shared drive can move items from that shared drive into their My Drive which transfers the ownership to them.", "location": "query", "type": "boolean" }, @@ -1627,7 +1557,7 @@ "type": "boolean" } }, - "path": "drive/v3/files/{fileId}/permissions", + "path": "files/{fileId}/permissions", "request": { "$ref": "Permission" }, @@ -1640,8 +1570,7 @@ ] }, "delete": { - "description": "Deletes a permission. **Warning:** Concurrent permissions operations on the same file are not supported; only the last update is applied.", - "flatPath": "drive/v3/files/{fileId}/permissions/{permissionId}", + "description": "Deletes a permission.", "httpMethod": "DELETE", "id": "drive.permissions.delete", "parameterOrder": [ @@ -1669,7 +1598,7 @@ }, "supportsTeamDrives": { "default": "false", - "description": "Deprecated: Use `supportsAllDrives` instead.", + "description": "Deprecated use supportsAllDrives instead.", "location": "query", "type": "boolean" }, @@ -1680,7 +1609,7 @@ "type": "boolean" } }, - "path": "drive/v3/files/{fileId}/permissions/{permissionId}", + "path": "files/{fileId}/permissions/{permissionId}", "scopes": [ "https://www.googleapis.com/auth/drive", "https://www.googleapis.com/auth/drive.file" @@ -1688,7 +1617,6 @@ }, "get": { "description": "Gets a permission by ID.", - "flatPath": "drive/v3/files/{fileId}/permissions/{permissionId}", "httpMethod": "GET", "id": "drive.permissions.get", "parameterOrder": [ @@ -1716,7 +1644,7 @@ }, "supportsTeamDrives": { "default": "false", - "description": "Deprecated: Use `supportsAllDrives` instead.", + "description": "Deprecated use supportsAllDrives instead.", "location": "query", "type": "boolean" }, @@ -1727,7 +1655,7 @@ "type": "boolean" } }, - "path": "drive/v3/files/{fileId}/permissions/{permissionId}", + "path": "files/{fileId}/permissions/{permissionId}", "response": { "$ref": "Permission" }, @@ -1742,7 +1670,6 @@ }, "list": { "description": "Lists a file's or shared drive's permissions.", - "flatPath": "drive/v3/files/{fileId}/permissions", "httpMethod": "GET", "id": "drive.permissions.list", "parameterOrder": [ @@ -1781,7 +1708,7 @@ }, "supportsTeamDrives": { "default": "false", - "description": "Deprecated: Use `supportsAllDrives` instead.", + "description": "Deprecated use supportsAllDrives instead.", "location": "query", "type": "boolean" }, @@ -1792,7 +1719,7 @@ "type": "boolean" } }, - "path": "drive/v3/files/{fileId}/permissions", + "path": "files/{fileId}/permissions", "response": { "$ref": "PermissionList" }, @@ -1806,8 +1733,7 @@ ] }, "update": { - "description": "Updates a permission with patch semantics. **Warning:** Concurrent permissions operations on the same file are not supported; only the last update is applied.", - "flatPath": "drive/v3/files/{fileId}/permissions/{permissionId}", + "description": "Updates a permission with patch semantics.", "httpMethod": "PATCH", "id": "drive.permissions.update", "parameterOrder": [ @@ -1841,13 +1767,13 @@ }, "supportsTeamDrives": { "default": "false", - "description": "Deprecated: Use `supportsAllDrives` instead.", + "description": "Deprecated use supportsAllDrives instead.", "location": "query", "type": "boolean" }, "transferOwnership": { "default": "false", - "description": "Whether to transfer ownership to the specified user and downgrade the current owner to a writer. This parameter is required as an acknowledgement of the side effect.", + "description": "Whether to transfer ownership to the specified user and downgrade the current owner to a writer. This parameter is required as an acknowledgement of the side effect. File owners can only transfer ownership of files existing on My Drive. Files existing in a shared drive are owned by the organization that owns that shared drive. Ownership transfers are not supported for files and folders in shared drives. Organizers of a shared drive can move items from that shared drive into their My Drive which transfers the ownership to them.", "location": "query", "type": "boolean" }, @@ -1858,7 +1784,7 @@ "type": "boolean" } }, - "path": "drive/v3/files/{fileId}/permissions/{permissionId}", + "path": "files/{fileId}/permissions/{permissionId}", "request": { "$ref": "Permission" }, @@ -1876,7 +1802,6 @@ "methods": { "create": { "description": "Creates a reply to a comment.", - "flatPath": "drive/v3/files/{fileId}/comments/{commentId}/replies", "httpMethod": "POST", "id": "drive.replies.create", "parameterOrder": [ @@ -1897,7 +1822,7 @@ "type": "string" } }, - "path": "drive/v3/files/{fileId}/comments/{commentId}/replies", + "path": "files/{fileId}/comments/{commentId}/replies", "request": { "$ref": "Reply" }, @@ -1911,7 +1836,6 @@ }, "delete": { "description": "Deletes a reply.", - "flatPath": "drive/v3/files/{fileId}/comments/{commentId}/replies/{replyId}", "httpMethod": "DELETE", "id": "drive.replies.delete", "parameterOrder": [ @@ -1939,7 +1863,7 @@ "type": "string" } }, - "path": "drive/v3/files/{fileId}/comments/{commentId}/replies/{replyId}", + "path": "files/{fileId}/comments/{commentId}/replies/{replyId}", "scopes": [ "https://www.googleapis.com/auth/drive", "https://www.googleapis.com/auth/drive.file" @@ -1947,7 +1871,6 @@ }, "get": { "description": "Gets a reply by ID.", - "flatPath": "drive/v3/files/{fileId}/comments/{commentId}/replies/{replyId}", "httpMethod": "GET", "id": "drive.replies.get", "parameterOrder": [ @@ -1981,7 +1904,7 @@ "type": "string" } }, - "path": "drive/v3/files/{fileId}/comments/{commentId}/replies/{replyId}", + "path": "files/{fileId}/comments/{commentId}/replies/{replyId}", "response": { "$ref": "Reply" }, @@ -1993,7 +1916,6 @@ }, "list": { "description": "Lists a comment's replies.", - "flatPath": "drive/v3/files/{fileId}/comments/{commentId}/replies", "httpMethod": "GET", "id": "drive.replies.list", "parameterOrder": [ @@ -2034,7 +1956,7 @@ "type": "string" } }, - "path": "drive/v3/files/{fileId}/comments/{commentId}/replies", + "path": "files/{fileId}/comments/{commentId}/replies", "response": { "$ref": "ReplyList" }, @@ -2046,7 +1968,6 @@ }, "update": { "description": "Updates a reply with patch semantics.", - "flatPath": "drive/v3/files/{fileId}/comments/{commentId}/replies/{replyId}", "httpMethod": "PATCH", "id": "drive.replies.update", "parameterOrder": [ @@ -2074,7 +1995,7 @@ "type": "string" } }, - "path": "drive/v3/files/{fileId}/comments/{commentId}/replies/{replyId}", + "path": "files/{fileId}/comments/{commentId}/replies/{replyId}", "request": { "$ref": "Reply" }, @@ -2092,7 +2013,6 @@ "methods": { "delete": { "description": "Permanently deletes a file version. You can only delete revisions for files with binary content in Google Drive, like images or videos. Revisions for other files, like Google Docs or Sheets, and the last remaining file version can't be deleted.", - "flatPath": "drive/v3/files/{fileId}/revisions/{revisionId}", "httpMethod": "DELETE", "id": "drive.revisions.delete", "parameterOrder": [ @@ -2113,7 +2033,7 @@ "type": "string" } }, - "path": "drive/v3/files/{fileId}/revisions/{revisionId}", + "path": "files/{fileId}/revisions/{revisionId}", "scopes": [ "https://www.googleapis.com/auth/drive", "https://www.googleapis.com/auth/drive.appdata", @@ -2122,7 +2042,6 @@ }, "get": { "description": "Gets a revision's metadata or content by ID.", - "flatPath": "drive/v3/files/{fileId}/revisions/{revisionId}", "httpMethod": "GET", "id": "drive.revisions.get", "parameterOrder": [ @@ -2149,7 +2068,7 @@ "type": "string" } }, - "path": "drive/v3/files/{fileId}/revisions/{revisionId}", + "path": "files/{fileId}/revisions/{revisionId}", "response": { "$ref": "Revision" }, @@ -2167,7 +2086,6 @@ }, "list": { "description": "Lists a file's revisions.", - "flatPath": "drive/v3/files/{fileId}/revisions", "httpMethod": "GET", "id": "drive.revisions.list", "parameterOrder": [ @@ -2195,7 +2113,7 @@ "type": "string" } }, - "path": "drive/v3/files/{fileId}/revisions", + "path": "files/{fileId}/revisions", "response": { "$ref": "RevisionList" }, @@ -2211,7 +2129,6 @@ }, "update": { "description": "Updates a revision with patch semantics.", - "flatPath": "drive/v3/files/{fileId}/revisions/{revisionId}", "httpMethod": "PATCH", "id": "drive.revisions.update", "parameterOrder": [ @@ -2232,7 +2149,7 @@ "type": "string" } }, - "path": "drive/v3/files/{fileId}/revisions/{revisionId}", + "path": "files/{fileId}/revisions/{revisionId}", "request": { "$ref": "Revision" }, @@ -2250,8 +2167,7 @@ "teamdrives": { "methods": { "create": { - "description": "Deprecated: Use `drives.create` instead.", - "flatPath": "drive/v3/teamdrives", + "description": "Deprecated use drives.create instead.", "httpMethod": "POST", "id": "drive.teamdrives.create", "parameterOrder": [ @@ -2265,7 +2181,7 @@ "type": "string" } }, - "path": "drive/v3/teamdrives", + "path": "teamdrives", "request": { "$ref": "TeamDrive" }, @@ -2277,8 +2193,7 @@ ] }, "delete": { - "description": "Deprecated: Use `drives.delete` instead.", - "flatPath": "drive/v3/teamdrives/{teamDriveId}", + "description": "Deprecated use drives.delete instead.", "httpMethod": "DELETE", "id": "drive.teamdrives.delete", "parameterOrder": [ @@ -2292,14 +2207,13 @@ "type": "string" } }, - "path": "drive/v3/teamdrives/{teamDriveId}", + "path": "teamdrives/{teamDriveId}", "scopes": [ "https://www.googleapis.com/auth/drive" ] }, "get": { - "description": "Deprecated: Use `drives.get` instead.", - "flatPath": "drive/v3/teamdrives/{teamDriveId}", + "description": "Deprecated use drives.get instead.", "httpMethod": "GET", "id": "drive.teamdrives.get", "parameterOrder": [ @@ -2319,7 +2233,7 @@ "type": "boolean" } }, - "path": "drive/v3/teamdrives/{teamDriveId}", + "path": "teamdrives/{teamDriveId}", "response": { "$ref": "TeamDrive" }, @@ -2329,11 +2243,9 @@ ] }, "list": { - "description": "Deprecated: Use `drives.list` instead.", - "flatPath": "drive/v3/teamdrives", + "description": "Deprecated use drives.list instead.", "httpMethod": "GET", "id": "drive.teamdrives.list", - "parameterOrder": [], "parameters": { "pageSize": { "default": "10", @@ -2361,7 +2273,7 @@ "type": "boolean" } }, - "path": "drive/v3/teamdrives", + "path": "teamdrives", "response": { "$ref": "TeamDriveList" }, @@ -2371,8 +2283,7 @@ ] }, "update": { - "description": "Deprecated: Use `drives.update` instead.", - "flatPath": "drive/v3/teamdrives/{teamDriveId}", + "description": "Deprecated use drives.update instead", "httpMethod": "PATCH", "id": "drive.teamdrives.update", "parameterOrder": [ @@ -2392,7 +2303,7 @@ "type": "boolean" } }, - "path": "drive/v3/teamdrives/{teamDriveId}", + "path": "teamdrives/{teamDriveId}", "request": { "$ref": "TeamDrive" }, @@ -2406,7 +2317,7 @@ } } }, - "revision": "20230502", + "revision": "20230514", "rootUrl": "https://www.googleapis.com/", "schemas": { "About": { @@ -2422,7 +2333,7 @@ "type": "boolean" }, "canCreateTeamDrives": { - "description": "Deprecated: Use `canCreateDrives` instead.", + "description": "Deprecated - use canCreateDrives instead.", "type": "boolean" }, "driveThemes": { @@ -2475,7 +2386,7 @@ }, "kind": { "default": "drive#about", - "description": "Identifies what kind of resource this is. Value: the fixed string `\"drive#about\"`.", + "description": "Identifies what kind of resource this is. Value: the fixed string \"drive#about\".", "type": "string" }, "maxImportSizes": { @@ -2518,19 +2429,19 @@ "type": "object" }, "teamDriveThemes": { - "description": "Deprecated: Use `driveThemes` instead.", + "description": "Deprecated - use driveThemes instead.", "items": { "properties": { "backgroundImageLink": { - "description": "Deprecated: Use `driveThemes/backgroundImageLink` instead.", + "description": "Deprecated - use driveThemes/backgroundImageLink instead.", "type": "string" }, "colorRgb": { - "description": "Deprecated: Use `driveThemes/colorRgb` instead.", + "description": "Deprecated - use driveThemes/colorRgb instead.", "type": "string" }, "id": { - "description": "Deprecated: Use `driveThemes/id` instead.", + "description": "Deprecated - use driveThemes/id instead.", "type": "string" } }, @@ -2550,7 +2461,7 @@ "id": "Change", "properties": { "changeType": { - "description": "The type of the change. Possible values are `file` and `drive`.", + "description": "The type of the change. Possible values are file and drive.", "type": "string" }, "drive": { @@ -2571,7 +2482,7 @@ }, "kind": { "default": "drive#change", - "description": "Identifies what kind of resource this is. Value: the fixed string `\"drive#change\"`.", + "description": "Identifies what kind of resource this is. Value: the fixed string \"drive#change\".", "type": "string" }, "removed": { @@ -2580,10 +2491,10 @@ }, "teamDrive": { "$ref": "TeamDrive", - "description": "Deprecated: Use `drive` instead." + "description": "Deprecated - use drive instead." }, "teamDriveId": { - "description": "Deprecated: Use `driveId` instead.", + "description": "Deprecated - use driveId instead.", "type": "string" }, "time": { @@ -2592,7 +2503,7 @@ "type": "string" }, "type": { - "description": "Deprecated: Use `changeType` instead.", + "description": "Deprecated - use changeType instead.", "type": "string" } }, @@ -2611,7 +2522,7 @@ }, "kind": { "default": "drive#changeList", - "description": "Identifies what kind of resource this is. Value: the fixed string `\"drive#changeList\"`.", + "description": "Identifies what kind of resource this is. Value: the fixed string \"drive#changeList\".", "type": "string" }, "newStartPageToken": { @@ -2626,7 +2537,7 @@ "type": "object" }, "Channel": { - "description": "A notification channel used to watch for resource changes.", + "description": "An notification channel used to watch for resource changes.", "id": "Channel", "properties": { "address": { @@ -2644,11 +2555,12 @@ }, "kind": { "default": "api#channel", - "description": "Identifies this as a notification channel used to watch for changes to a resource, which is `api#channel`.", + "description": "Identifies this as a notification channel used to watch for changes to a resource, which is \"api#channel\".", "type": "string" }, "params": { "additionalProperties": { + "description": "Declares a new parameter by name.", "type": "string" }, "description": "Additional parameters controlling delivery channel behavior. Optional.", @@ -2671,7 +2583,7 @@ "type": "string" }, "type": { - "description": "The type of delivery mechanism used for this channel.", + "description": "The type of delivery mechanism used for this channel. Valid values are \"web_hook\" (or \"webhook\"). Both values refer to a channel where Http requests are used to deliver messages.", "type": "string" } }, @@ -2682,12 +2594,12 @@ "id": "Comment", "properties": { "anchor": { - "description": "A region of the document represented as a JSON string. For details on defining anchor properties, refer to [Manage comments and replies](https://developers.google.com/drive/api/v3/manage-comments).", + "description": "A region of the document represented as a JSON string. For details on defining anchor properties, refer to Add comments and replies.", "type": "string" }, "author": { "$ref": "User", - "description": "Output only. The author of the comment. The author's email address and permission ID will not be populated." + "description": "The author of the comment. The author's email address and permission ID will not be populated." }, "content": { "annotations": { @@ -2696,7 +2608,7 @@ "drive.comments.update" ] }, - "description": "The plain text content of the comment. This field is used for setting the content, while `htmlContent` should be displayed.", + "description": "The plain text content of the comment. This field is used for setting the content, while htmlContent should be displayed.", "type": "string" }, "createdTime": { @@ -2705,20 +2617,20 @@ "type": "string" }, "deleted": { - "description": "Output only. Whether the comment has been deleted. A deleted comment has no content.", + "description": "Whether the comment has been deleted. A deleted comment has no content.", "type": "boolean" }, "htmlContent": { - "description": "Output only. The content of the comment with HTML formatting.", + "description": "The content of the comment with HTML formatting.", "type": "string" }, "id": { - "description": "Output only. The ID of the comment.", + "description": "The ID of the comment.", "type": "string" }, "kind": { "default": "drive#comment", - "description": "Output only. Identifies what kind of resource this is. Value: the fixed string `\"drive#comment\"`.", + "description": "Identifies what kind of resource this is. Value: the fixed string \"drive#comment\".", "type": "string" }, "modifiedTime": { @@ -2741,14 +2653,14 @@ "type": "object" }, "replies": { - "description": "Output only. The full list of replies to the comment in chronological order.", + "description": "The full list of replies to the comment in chronological order.", "items": { "$ref": "Reply" }, "type": "array" }, "resolved": { - "description": "Output only. Whether the comment has been resolved by one of its replies.", + "description": "Whether the comment has been resolved by one of its replies.", "type": "boolean" } }, @@ -2767,7 +2679,7 @@ }, "kind": { "default": "drive#commentList", - "description": "Identifies what kind of resource this is. Value: the fixed string `\"drive#commentList\"`.", + "description": "Identifies what kind of resource this is. Value: the fixed string \"drive#commentList\".", "type": "string" }, "nextPageToken": { @@ -2786,12 +2698,12 @@ "type": "boolean" }, "reason": { - "description": "Reason for why the content of the file is restricted. This is only mutable on requests that also set `readOnly=true`.", + "description": "Reason for why the content of the file is restricted. This is only mutable on requests that also set readOnly=true.", "type": "string" }, "restrictingUser": { "$ref": "User", - "description": "Output only. The user who set the content restriction. Only populated if `readOnly` is true." + "description": "The user who set the content restriction. Only populated if readOnly is true." }, "restrictionTime": { "description": "The time at which the content restriction was set (formatted RFC 3339 timestamp). Only populated if readOnly is true.", @@ -2799,7 +2711,7 @@ "type": "string" }, "type": { - "description": "Output only. The type of the content restriction. Currently the only possible value is `globalContentRestriction`.", + "description": "The type of the content restriction. Currently the only possible value is globalContentRestriction.", "type": "string" } }, @@ -2810,7 +2722,7 @@ "id": "Drive", "properties": { "backgroundImageFile": { - "description": "An image file and cropping parameters from which a background image for this shared drive is set. This is a write only field; it can only be set on `drive.drives.update` requests that don't set `themeId`. When specified, all fields of the `backgroundImageFile` must be set.", + "description": "An image file and cropping parameters from which a background image for this shared drive is set. This is a write-only field; it can only be set on drive.drives.update requests that don't set themeId. When specified, all fields of the backgroundImageFile must be set.", "properties": { "id": { "description": "The ID of an image file in Google Drive to use for the background image.", @@ -2835,97 +2747,97 @@ "type": "object" }, "backgroundImageLink": { - "description": "Output only. A short-lived link to this shared drive's background image.", + "description": "A short-lived link to this shared drive's background image.", "type": "string" }, "capabilities": { - "description": "Output only. Capabilities the current user has on this shared drive.", + "description": "Capabilities the current user has on this shared drive.", "properties": { "canAddChildren": { - "description": "Output only. Whether the current user can add children to folders in this shared drive.", + "description": "Whether the current user can add children to folders in this shared drive.", "type": "boolean" }, "canChangeCopyRequiresWriterPermissionRestriction": { - "description": "Output only. Whether the current user can change the `copyRequiresWriterPermission` restriction of this shared drive.", + "description": "Whether the current user can change the copyRequiresWriterPermission restriction of this shared drive.", "type": "boolean" }, "canChangeDomainUsersOnlyRestriction": { - "description": "Output only. Whether the current user can change the `domainUsersOnly` restriction of this shared drive.", + "description": "Whether the current user can change the domainUsersOnly restriction of this shared drive.", "type": "boolean" }, "canChangeDriveBackground": { - "description": "Output only. Whether the current user can change the background of this shared drive.", + "description": "Whether the current user can change the background of this shared drive.", "type": "boolean" }, "canChangeDriveMembersOnlyRestriction": { - "description": "Output only. Whether the current user can change the `driveMembersOnly` restriction of this shared drive.", + "description": "Whether the current user can change the driveMembersOnly restriction of this shared drive.", "type": "boolean" }, "canChangeSharingFoldersRequiresOrganizerPermissionRestriction": { - "description": "Output only. Whether the current user can change the `sharingFoldersRequiresOrganizerPermission` restriction of this shared drive.", + "description": "Whether the current user can change the sharingFoldersRequiresOrganizerPermission restriction of this shared drive.", "type": "boolean" }, "canComment": { - "description": "Output only. Whether the current user can comment on files in this shared drive.", + "description": "Whether the current user can comment on files in this shared drive.", "type": "boolean" }, "canCopy": { - "description": "Output only. Whether the current user can copy files in this shared drive.", + "description": "Whether the current user can copy files in this shared drive.", "type": "boolean" }, "canDeleteChildren": { - "description": "Output only. Whether the current user can delete children from folders in this shared drive.", + "description": "Whether the current user can delete children from folders in this shared drive.", "type": "boolean" }, "canDeleteDrive": { - "description": "Output only. Whether the current user can delete this shared drive. Attempting to delete the shared drive may still fail if there are untrashed items inside the shared drive.", + "description": "Whether the current user can delete this shared drive. Attempting to delete the shared drive may still fail if there are untrashed items inside the shared drive.", "type": "boolean" }, "canDownload": { - "description": "Output only. Whether the current user can download files in this shared drive.", + "description": "Whether the current user can download files in this shared drive.", "type": "boolean" }, "canEdit": { - "description": "Output only. Whether the current user can edit files in this shared drive", + "description": "Whether the current user can edit files in this shared drive", "type": "boolean" }, "canListChildren": { - "description": "Output only. Whether the current user can list the children of folders in this shared drive.", + "description": "Whether the current user can list the children of folders in this shared drive.", "type": "boolean" }, "canManageMembers": { - "description": "Output only. Whether the current user can add members to this shared drive or remove them or change their role.", + "description": "Whether the current user can add members to this shared drive or remove them or change their role.", "type": "boolean" }, "canReadRevisions": { - "description": "Output only. Whether the current user can read the revisions resource of files in this shared drive.", + "description": "Whether the current user can read the revisions resource of files in this shared drive.", "type": "boolean" }, "canRename": { - "description": "Output only. Whether the current user can rename files or folders in this shared drive.", + "description": "Whether the current user can rename files or folders in this shared drive.", "type": "boolean" }, "canRenameDrive": { - "description": "Output only. Whether the current user can rename this shared drive.", + "description": "Whether the current user can rename this shared drive.", "type": "boolean" }, "canResetDriveRestrictions": { - "description": "Output only. Whether the current user can reset the shared drive restrictions to defaults.", + "description": "Whether the current user can reset the shared drive restrictions to defaults.", "type": "boolean" }, "canShare": { - "description": "Output only. Whether the current user can share files or folders in this shared drive.", + "description": "Whether the current user can share files or folders in this shared drive.", "type": "boolean" }, "canTrashChildren": { - "description": "Output only. Whether the current user can trash children from folders in this shared drive.", + "description": "Whether the current user can trash children from folders in this shared drive.", "type": "boolean" } }, "type": "object" }, "colorRgb": { - "description": "The color of this shared drive as an RGB hex string. It can only be set on a `drive.drives.update` request that does not set `themeId`.", + "description": "The color of this shared drive as an RGB hex string. It can only be set on drive.drives.update requests that don't set themeId.", "type": "string" }, "createdTime": { @@ -2938,20 +2850,25 @@ "type": "boolean" }, "id": { - "description": "Output only. The ID of this shared drive which is also the ID of the top level folder of this shared drive.", + "description": "The ID of this shared drive which is also the ID of the top level folder of this shared drive.", "type": "string" }, "kind": { "default": "drive#drive", - "description": "Output only. Identifies what kind of resource this is. Value: the fixed string `\"drive#drive\"`.", + "description": "Identifies what kind of resource this is. Value: the fixed string \"drive#drive\".", "type": "string" }, "name": { + "annotations": { + "required": [ + "drive.drives.create" + ] + }, "description": "The name of this shared drive.", "type": "string" }, "orgUnitId": { - "description": "Output only. The organizational unit of this shared drive. This field is only populated on `drives.list` responses when the `useDomainAdminAccess` parameter is set to `true`.", + "description": "The organizational unit of this shared drive. This field is only populated on drives.list responses when the useDomainAdminAccess parameter is set to true.", "type": "string" }, "restrictions": { @@ -2962,7 +2879,7 @@ "type": "boolean" }, "copyRequiresWriterPermission": { - "description": "Whether the options to copy, print, or download files inside this shared drive, should be disabled for readers and commenters. When this restriction is set to `true`, it will override the similarly named field to `true` for any file inside this shared drive.", + "description": "Whether the options to copy, print, or download files inside this shared drive, should be disabled for readers and commenters. When this restriction is set to true, it will override the similarly named field to true for any file inside this shared drive.", "type": "boolean" }, "domainUsersOnly": { @@ -2981,7 +2898,7 @@ "type": "object" }, "themeId": { - "description": "The ID of the theme from which the background image and color will be set. The set of possible `driveThemes` can be retrieved from a `drive.about.get` response. When not specified on a `drive.drives.create` request, a random theme is chosen from which the background image and color are set. This is a write-only field; it can only be set on requests that don't set `colorRgb` or `backgroundImageFile`.", + "description": "The ID of the theme from which the background image and color are set. The set of possible driveThemes can be retrieved from a drive.about.get response. When not specified on a drive.drives.create request, a random theme is chosen from which the background image and color are set. This is a write-only field; it can only be set on requests that don't set colorRgb or backgroundImageFile.", "type": "string" } }, @@ -3000,7 +2917,7 @@ }, "kind": { "default": "drive#driveList", - "description": "Identifies what kind of resource this is. Value: the fixed string `\"drive#driveList\"`.", + "description": "Identifies what kind of resource this is. Value: the fixed string \"drive#driveList\".", "type": "string" }, "nextPageToken": { @@ -3018,162 +2935,162 @@ "additionalProperties": { "type": "string" }, - "description": "A collection of arbitrary key-value pairs which are private to the requesting app.\nEntries with null values are cleared in update and copy requests. These properties can only be retrieved using an authenticated request. An authenticated request uses an access token obtained with a OAuth 2 client ID. You cannot use an API key to retrieve private properties.", + "description": "A collection of arbitrary key-value pairs that are private to the requesting app.\nEntries with null values are cleared in update and copy requests. These properties can only be retrieved using an authenticated request. An authenticated request uses an access token obtained with an OAuth 2 client ID. You cannot use an API key to retrieve private properties.", "type": "object" }, "capabilities": { - "description": "Output only. Capabilities the current user has on this file. Each capability corresponds to a fine-grained action that a user may take.", + "description": "Capabilities the current user has on this file. Each capability corresponds to a fine-grained action that a user can take.", "properties": { "canAcceptOwnership": { - "description": "Output only. Whether the current user is the pending owner of the file. Not populated for shared drive files.", + "description": "Whether the current user is the pending owner of the file. Not populated for shared drive files.", "type": "boolean" }, "canAddChildren": { - "description": "Output only. Whether the current user can add children to this folder. This is always false when the item is not a folder.", + "description": "Whether the current user can add children to this folder. This is always false when the item isn't a folder.", "type": "boolean" }, "canAddFolderFromAnotherDrive": { - "description": "Output only. Whether the current user can add a folder from another drive (different shared drive or My Drive) to this folder. This is false when the item is not a folder. Only populated for items in shared drives.", + "description": "Whether the current user can add a folder from another drive (different shared drive or My Drive) to this folder. This is false when the item isn't a folder. Only populated for items in shared drives.", "type": "boolean" }, "canAddMyDriveParent": { - "description": "Output only. Whether the current user can add a parent for the item without removing an existing parent in the same request. Not populated for shared drive files.", + "description": "Whether the current user can add a parent for the item without removing an existing parent in the same request. Not populated for shared drive files.", "type": "boolean" }, "canChangeCopyRequiresWriterPermission": { - "description": "Output only. Whether the current user can change the `copyRequiresWriterPermission` restriction of this file.", + "description": "Whether the current user can change the copyRequiresWriterPermission restriction of this file.", "type": "boolean" }, "canChangeSecurityUpdateEnabled": { - "description": "Output only. Whether the current user can change the securityUpdateEnabled field on link share metadata.", + "description": "Whether the current user can change the securityUpdateEnabled field on link share metadata.", "type": "boolean" }, "canChangeViewersCanCopyContent": { - "description": "Deprecated: Output only.", + "description": "Deprecated", "type": "boolean" }, "canComment": { - "description": "Output only. Whether the current user can comment on this file.", + "description": "Whether the current user can comment on this file.", "type": "boolean" }, "canCopy": { - "description": "Output only. Whether the current user can copy this file. For an item in a shared drive, whether the current user can copy non-folder descendants of this item, or this item itself if it is not a folder.", + "description": "Whether the current user can copy this file. For an item in a shared drive, whether the current user can copy non-folder descendants of this item, or this item itself if it's not a folder.", "type": "boolean" }, "canDelete": { - "description": "Output only. Whether the current user can delete this file.", + "description": "Whether the current user can delete this file.", "type": "boolean" }, "canDeleteChildren": { - "description": "Output only. Whether the current user can delete children of this folder. This is false when the item is not a folder. Only populated for items in shared drives.", + "description": "Whether the current user can delete children of this folder. This is false when the item isn't a folder. Only populated for items in shared drives.", "type": "boolean" }, "canDownload": { - "description": "Output only. Whether the current user can download this file.", + "description": "Whether the current user can download this file.", "type": "boolean" }, "canEdit": { - "description": "Output only. Whether the current user can edit this file. Other factors may limit the type of changes a user can make to a file. For example, see `canChangeCopyRequiresWriterPermission` or `canModifyContent`.", + "description": "Whether the current user can edit this file. Other factors might limit the type of changes a user can make to a file. For example, see canChangeCopyRequiresWriterPermission or canModifyContent.", "type": "boolean" }, "canListChildren": { - "description": "Output only. Whether the current user can list the children of this folder. This is always false when the item is not a folder.", + "description": "Whether the current user can list the children of this folder. This is always false when the item isn't a folder.", "type": "boolean" }, "canModifyContent": { - "description": "Output only. Whether the current user can modify the content of this file.", + "description": "Whether the current user can modify the content of this file.", "type": "boolean" }, "canModifyContentRestriction": { - "description": "Output only. Whether the current user can modify restrictions on content of this file.", + "description": "Whether the current user can modify restrictions on content of this file.", "type": "boolean" }, "canModifyLabels": { - "description": "Output only. Whether the current user can modify the labels on the file.", + "description": "Whether the current user can modify the labels on this file.", "type": "boolean" }, "canMoveChildrenOutOfDrive": { - "description": "Output only. Whether the current user can move children of this folder outside of the shared drive. This is false when the item is not a folder. Only populated for items in shared drives.", + "description": "Whether the current user can move children of this folder outside of the shared drive. This is false when the item isn't a folder. Only populated for items in shared drives.", "type": "boolean" }, "canMoveChildrenOutOfTeamDrive": { - "description": "Deprecated: Output only. Use `canMoveChildrenOutOfDrive` instead.", + "description": "Deprecated - use canMoveChildrenOutOfDrive instead.", "type": "boolean" }, "canMoveChildrenWithinDrive": { - "description": "Output only. Whether the current user can move children of this folder within this drive. This is false when the item is not a folder. Note that a request to move the child may still fail depending on the current user's access to the child and to the destination folder.", + "description": "Whether the current user can move children of this folder within this shared drive or My Drive. This is false when the item isn't a folder. Note that a request to move the child might still fail depending on the current user's access to the child and to the destination folder.", "type": "boolean" }, "canMoveChildrenWithinTeamDrive": { - "description": "Deprecated: Output only. Use `canMoveChildrenWithinDrive` instead.", + "description": "Deprecated - use canMoveChildrenWithinDrive instead.", "type": "boolean" }, "canMoveItemIntoTeamDrive": { - "description": "Deprecated: Output only. Use `canMoveItemOutOfDrive` instead.", + "description": "Deprecated - use canMoveItemOutOfDrive instead.", "type": "boolean" }, "canMoveItemOutOfDrive": { - "description": "Output only. Whether the current user can move this item outside of this drive by changing its parent. Note that a request to change the parent of the item may still fail depending on the new parent that is being added.", + "description": "Whether the current user can move this item outside of this shared drive or My Drive by changing its parent. Note that a request to change the parent of the item might still fail depending on the new parent that's being added.", "type": "boolean" }, "canMoveItemOutOfTeamDrive": { - "description": "Deprecated: Output only. Use `canMoveItemOutOfDrive` instead.", + "description": "Deprecated - use canMoveItemOutOfDrive instead.", "type": "boolean" }, "canMoveItemWithinDrive": { - "description": "Output only. Whether the current user can move this item within this drive. Note that a request to change the parent of the item may still fail depending on the new parent that is being added and the parent that is being removed.", + "description": "Whether the current user can move this item within this shared drive or My Drive. Note that a request to change the parent of the item might still fail depending on the new parent that's being added and the parent that's being removed.", "type": "boolean" }, "canMoveItemWithinTeamDrive": { - "description": "Deprecated: Output only. Use `canMoveItemWithinDrive` instead.", + "description": "Deprecated - use canMoveItemWithinDrive instead.", "type": "boolean" }, "canMoveTeamDriveItem": { - "description": "Deprecated: Output only. Use `canMoveItemWithinDrive` or `canMoveItemOutOfDrive` instead.", + "description": "Deprecated - use canMoveItemWithinDrive or canMoveItemOutOfDrive instead.", "type": "boolean" }, "canReadDrive": { - "description": "Output only. Whether the current user can read the shared drive to which this file belongs. Only populated for items in shared drives.", + "description": "Whether the current user can read the shared drive to which this file belongs. Only populated for items in shared drives.", "type": "boolean" }, "canReadLabels": { - "description": "Output only. Whether the current user can read the labels on the file.", + "description": "Whether the current user can read the labels on this file.", "type": "boolean" }, "canReadRevisions": { - "description": "Output only. Whether the current user can read the revisions resource of this file. For a shared drive item, whether revisions of non-folder descendants of this item, or this item itself if it is not a folder, can be read.", + "description": "Whether the current user can read the revisions resource of this file. For a shared drive item, whether revisions of non-folder descendants of this item, or this item itself if it's not a folder, can be read.", "type": "boolean" }, "canReadTeamDrive": { - "description": "Deprecated: Output only. Use `canReadDrive` instead.", + "description": "Deprecated - use canReadDrive instead.", "type": "boolean" }, "canRemoveChildren": { - "description": "Output only. Whether the current user can remove children from this folder. This is always false when the item is not a folder. For a folder in a shared drive, use `canDeleteChildren` or `canTrashChildren` instead.", + "description": "Whether the current user can remove children from this folder. This is always false when the item isn't a folder. For a folder in a shared drive, use canDeleteChildren or canTrashChildren instead.", "type": "boolean" }, "canRemoveMyDriveParent": { - "description": "Output only. Whether the current user can remove a parent from the item without adding another parent in the same request. Not populated for shared drive files.", + "description": "Whether the current user can remove a parent from the item without adding another parent in the same request. Not populated for shared drive files.", "type": "boolean" }, "canRename": { - "description": "Output only. Whether the current user can rename this file.", + "description": "Whether the current user can rename this file.", "type": "boolean" }, "canShare": { - "description": "Output only. Whether the current user can modify the sharing settings for this file.", + "description": "Whether the current user can modify the sharing settings for this file.", "type": "boolean" }, "canTrash": { - "description": "Output only. Whether the current user can move this file to trash.", + "description": "Whether the current user can move this file to trash.", "type": "boolean" }, "canTrashChildren": { - "description": "Output only. Whether the current user can trash children of this folder. This is false when the item is not a folder. Only populated for items in shared drives.", + "description": "Whether the current user can trash children of this folder. This is false when the item isn't a folder. Only populated for items in shared drives.", "type": "boolean" }, "canUntrash": { - "description": "Output only. Whether the current user can restore this file from trash.", + "description": "Whether the current user can restore this file from trash.", "type": "boolean" } }, @@ -3183,7 +3100,7 @@ "description": "Additional information about the content of the file. These fields are never populated in responses.", "properties": { "indexableText": { - "description": "Text to be indexed for the file to improve fullText queries. This is limited to 128KB in length and may contain HTML elements.", + "description": "Text to be indexed for the file to improve fullText queries. This is limited to 128 KB in length and might contain HTML elements. For more information, see Manage file metadata.", "type": "string" }, "thumbnail": { @@ -3225,47 +3142,48 @@ "type": "string" }, "driveId": { - "description": "Output only. ID of the shared drive the file resides in. Only populated for items in shared drives.", + "description": "ID of the shared drive the file resides in. Only populated for items in shared drives.", "type": "string" }, "explicitlyTrashed": { - "description": "Output only. Whether the file has been explicitly trashed, as opposed to recursively trashed from a parent folder.", + "description": "Whether the file has been explicitly trashed, as opposed to recursively trashed from a parent folder.", "type": "boolean" }, "exportLinks": { "additionalProperties": { + "description": "A mapping from export format to URL", "type": "string" }, - "description": "Output only. Links for exporting Docs Editors files to specific formats.", + "description": "Links for exporting Docs Editors files to specific formats.", "readOnly": true, "type": "object" }, "fileExtension": { - "description": "Output only. The final component of `fullFileExtension`. This is only available for files with binary content in Google Drive.", + "description": "The final component of fullFileExtension. This is only available for files with binary content in Google Drive.", "type": "string" }, "folderColorRgb": { - "description": "The color for a folder or a shortcut to a folder as an RGB hex string. The supported colors are published in the `folderColorPalette` field of the About resource. If an unsupported color is specified, the closest color in the palette is used instead.", + "description": "The color for a folder or shortcut to a folder as an RGB hex string. The supported colors are published in the folderColorPalette field of the About resource.\nIf an unsupported color is specified, the closest color in the palette will be used instead.", "type": "string" }, "fullFileExtension": { - "description": "Output only. The full file extension extracted from the `name` field. May contain multiple concatenated extensions, such as \"tar.gz\". This is only available for files with binary content in Google Drive. This is automatically updated when the `name` field changes, however it is not cleared if the new name does not contain a valid extension.", + "description": "The full file extension extracted from the name field. Can contain multiple concatenated extensions, such as \"tar.gz\". This is only available for files with binary content in Google Drive.\nThis is automatically updated when the name field changes, however it's not cleared if the new name does not contain a valid extension.", "type": "string" }, "hasAugmentedPermissions": { - "description": "Output only. Whether there are permissions directly on this file. This field is only populated for items in shared drives.", + "description": "Whether there are permissions directly on this file. This field is only populated for items in shared drives.", "type": "boolean" }, "hasThumbnail": { - "description": "Output only. Whether this file has a thumbnail. This does not indicate whether the requesting app has access to the thumbnail. To check access, look for the presence of the thumbnailLink field.", + "description": "Whether this file has a thumbnail. This does not indicate whether the requesting app has access to the thumbnail. To check access, look for the presence of the thumbnailLink field.", "type": "boolean" }, "headRevisionId": { - "description": "Output only. The ID of the file's head revision. This is currently only available for files with binary content in Google Drive.", + "description": "The ID of the file's head revision. This is only available for files with binary content in Google Drive.", "type": "string" }, "iconLink": { - "description": "Output only. A static, unauthenticated link to the file's icon.", + "description": "A static, unauthenticated link to the file's icon.", "type": "string" }, "id": { @@ -3273,77 +3191,77 @@ "type": "string" }, "imageMediaMetadata": { - "description": "Output only. Additional metadata about image media, if available.", + "description": "Additional metadata about image media, if available.", "properties": { "aperture": { - "description": "Output only. The aperture used to create the photo (f-number).", + "description": "The aperture used to create the photo (f-number).", "format": "float", "type": "number" }, "cameraMake": { - "description": "Output only. The make of the camera used to create the photo.", + "description": "The make of the camera used to create the photo.", "type": "string" }, "cameraModel": { - "description": "Output only. The model of the camera used to create the photo.", + "description": "The model of the camera used to create the photo.", "type": "string" }, "colorSpace": { - "description": "Output only. The color space of the photo.", + "description": "The color space of the photo.", "type": "string" }, "exposureBias": { - "description": "Output only. The exposure bias of the photo (APEX value).", + "description": "The exposure bias of the photo (APEX value).", "format": "float", "type": "number" }, "exposureMode": { - "description": "Output only. The exposure mode used to create the photo.", + "description": "The exposure mode used to create the photo.", "type": "string" }, "exposureTime": { - "description": "Output only. The length of the exposure, in seconds.", + "description": "The length of the exposure, in seconds.", "format": "float", "type": "number" }, "flashUsed": { - "description": "Output only. Whether a flash was used to create the photo.", + "description": "Whether a flash was used to create the photo.", "type": "boolean" }, "focalLength": { - "description": "Output only. The focal length used to create the photo, in millimeters.", + "description": "The focal length used to create the photo, in millimeters.", "format": "float", "type": "number" }, "height": { - "description": "Output only. The height of the image in pixels.", + "description": "The height of the image in pixels.", "format": "int32", "type": "integer" }, "isoSpeed": { - "description": "Output only. The ISO speed used to create the photo.", + "description": "The ISO speed used to create the photo.", "format": "int32", "type": "integer" }, "lens": { - "description": "Output only. The lens used to create the photo.", + "description": "The lens used to create the photo.", "type": "string" }, "location": { - "description": "Output only. Geographic location information stored in the image.", + "description": "Geographic location information stored in the image.", "properties": { "altitude": { - "description": "Output only. The altitude stored in the image.", + "description": "The altitude stored in the image.", "format": "double", "type": "number" }, "latitude": { - "description": "Output only. The latitude stored in the image.", + "description": "The latitude stored in the image.", "format": "double", "type": "number" }, "longitude": { - "description": "Output only. The longitude stored in the image.", + "description": "The longitude stored in the image.", "format": "double", "type": "number" } @@ -3351,38 +3269,38 @@ "type": "object" }, "maxApertureValue": { - "description": "Output only. The smallest f-number of the lens at the focal length used to create the photo (APEX value).", + "description": "The smallest f-number of the lens at the focal length used to create the photo (APEX value).", "format": "float", "type": "number" }, "meteringMode": { - "description": "Output only. The metering mode used to create the photo.", + "description": "The metering mode used to create the photo.", "type": "string" }, "rotation": { - "description": "Output only. The number of clockwise 90 degree rotations applied from the image's original orientation.", + "description": "The number of clockwise 90-degree rotations applied from the image's original orientation.", "format": "int32", "type": "integer" }, "sensor": { - "description": "Output only. The type of sensor used to create the photo.", + "description": "The type of sensor used to create the photo.", "type": "string" }, "subjectDistance": { - "description": "Output only. The distance to the subject of the photo, in meters.", + "description": "The distance to the subject of the photo, in meters.", "format": "int32", "type": "integer" }, "time": { - "description": "Output only. The date and time the photo was taken (EXIF DateTime).", + "description": "The date and time the photo was taken (EXIF DateTime).", "type": "string" }, "whiteBalance": { - "description": "Output only. The white balance mode used to create the photo.", + "description": "The white balance mode used to create the photo.", "type": "string" }, "width": { - "description": "Output only. The width of the image in pixels.", + "description": "The width of the image in pixels.", "format": "int32", "type": "integer" } @@ -3390,19 +3308,19 @@ "type": "object" }, "isAppAuthorized": { - "description": "Output only. Whether the file was created or opened by the requesting app.", + "description": "Whether the requesting app created or opened the file.", "type": "boolean" }, "kind": { "default": "drive#file", - "description": "Output only. Identifies what kind of resource this is. Value: the fixed string `\"drive#file\"`.", + "description": "Identifies what kind of resource this is. Value: the fixed string \"drive#file\".", "type": "string" }, "labelInfo": { - "description": "Output only. An overview of the labels on the file.", + "description": "An overview of the labels on the file.", "properties": { "labels": { - "description": "Output only. The set of labels on the file as requested by the label IDs in the `includeLabels` parameter. By default, no labels are returned.", + "description": "The set of labels on the file as requested by the label IDs in the includeLabels parameter. By default, no labels are returned.", "items": { "$ref": "Label" }, @@ -3413,79 +3331,79 @@ }, "lastModifyingUser": { "$ref": "User", - "description": "Output only. The last user to modify the file." + "description": "The last user to modify the file." }, "linkShareMetadata": { "description": "Contains details about the link URLs that clients are using to refer to this item.", "properties": { "securityUpdateEligible": { - "description": "Output only. Whether the file is eligible for security update.", + "description": "Whether the file is eligible for security update.", "type": "boolean" }, "securityUpdateEnabled": { - "description": "Output only. Whether the security update is enabled for this file.", + "description": "Whether the security update is enabled for this file.", "type": "boolean" } }, "type": "object" }, "md5Checksum": { - "description": "Output only. The MD5 checksum for the content of the file. This is only applicable to files with binary content in Google Drive.", + "description": "The MD5 checksum for the content of the file. This is only applicable to files with binary content in Google Drive.", "type": "string" }, "mimeType": { - "description": "The MIME type of the file. Google Drive attempts to automatically detect an appropriate value from uploaded content, if no value is provided. The value cannot be changed unless a new revision is uploaded. If a file is created with a Google Doc MIME type, the uploaded content is imported, if possible. The supported import formats are published in the About resource.", + "description": "The MIME type of the file.\nGoogle Drive will attempt to automatically detect an appropriate value from uploaded content if no value is provided. The value cannot be changed unless a new revision is uploaded.\nIf a file is created with a Google Doc MIME type, the uploaded content will be imported if possible. The supported import formats are published in the About resource.", "type": "string" }, "modifiedByMe": { - "description": "Output only. Whether the file has been modified by this user.", + "description": "Whether this user has modified the file.", "type": "boolean" }, "modifiedByMeTime": { - "description": "The last time the file was modified by the user (RFC 3339 date-time).", + "description": "The last time the user modified the file (RFC 3339 date-time).", "format": "date-time", "type": "string" }, "modifiedTime": { - "description": "he last time the file was modified by anyone (RFC 3339 date-time). Note that setting modifiedTime will also update modifiedByMeTime for the user.", + "description": "The last time anyone modified the file (RFC 3339 date-time).\nNote that setting modifiedTime will also update modifiedByMeTime for the user.", "format": "date-time", "type": "string" }, "name": { - "description": "The name of the file. This is not necessarily unique within a folder. Note that for immutable items such as the top level folders of shared drives, My Drive root folder, and Application Data folder the name is constant.", + "description": "The name of the file. This isn't necessarily unique within a folder. Note that for immutable items such as the top-level folders of shared drives, My Drive root folder, and Application Data folder the name is constant.", "type": "string" }, "originalFilename": { - "description": "The original filename of the uploaded content if available, or else the original value of the `name` field. This is only available for files with binary content in Google Drive.", + "description": "The original filename of the uploaded content if available, or else the original value of the name field. This is only available for files with binary content in Google Drive.", "type": "string" }, "ownedByMe": { - "description": "Output only. Whether the user owns the file. Not populated for items in shared drives.", + "description": "Whether the user owns the file. Not populated for items in shared drives.", "type": "boolean" }, "owners": { - "description": "Output only. The owner of this file. Only certain legacy files may have more than one owner. This field isn't populated for items in shared drives.", + "description": "The owner of this file. Only certain legacy files might have more than one owner. This field isn't populated for items in shared drives.", "items": { "$ref": "User" }, "type": "array" }, "parents": { - "description": "The IDs of the parent folders which contain the file. If not specified as part of a create request, the file is placed directly in the user's My Drive folder. If not specified as part of a copy request, the file inherits any discoverable parents of the source file. Update requests must use the `addParents` and `removeParents` parameters to modify the parents list.", + "description": "The IDs of the parent folders that contain the file.\nIf not specified as part of a create request, the file will be placed directly in the user's My Drive folder. If not specified as part of a copy request, the file will inherit any discoverable parents of the source file. Update requests must use the addParents and removeParents parameters to modify the parents list.", "items": { "type": "string" }, "type": "array" }, "permissionIds": { - "description": "Output only. List of permission IDs for users with access to this file.", + "description": "List of permission IDs for users with access to this file.", "items": { "type": "string" }, "type": "array" }, "permissions": { - "description": "Output only. The full list of permissions for the file. This is only available if the requesting user can share the file. Not populated for items in shared drives.", + "description": "The full list of permissions for the file. This is only available if the requesting user can share the file. Not populated for items in shared drives.", "items": { "$ref": "Permission" }, @@ -3495,28 +3413,28 @@ "additionalProperties": { "type": "string" }, - "description": "A collection of arbitrary key-value pairs which are visible to all apps.\nEntries with null values are cleared in update and copy requests.", + "description": "A collection of arbitrary key-value pairs that are visible to all apps.\nEntries with null values are cleared in update and copy requests.", "type": "object" }, "quotaBytesUsed": { - "description": "Output only. The number of storage quota bytes used by the file. This includes the head revision as well as previous revisions with `keepForever` enabled.", + "description": "The number of storage quota bytes used by the file. This includes the head revision as well as previous revisions with keepForever enabled.", "format": "int64", "type": "string" }, "resourceKey": { - "description": "Output only. A key needed to access the item via a shared link.", + "description": "A key needed to access the item via a shared link.", "type": "string" }, "sha1Checksum": { - "description": "Output only. The SHA1 checksum associated with this file, if available. This field is only populated for files with content stored in Google Drive; it is not populated for Docs Editors or shortcut files.", + "description": "The SHA1 checksum associated with this file, if available. This field is only populated for files with content stored in Google Drive; it's not populated for Docs Editors or shortcut files.", "type": "string" }, "sha256Checksum": { - "description": "Output only. The SHA256 checksum associated with this file, if available. This field is only populated for files with content stored in Google Drive; it is not populated for Docs Editors or shortcut files.", + "description": "The SHA256 checksum associated with this file, if available. This field is only populated for files with content stored in Google Drive; it's not populated for Docs Editors or shortcut files.", "type": "string" }, "shared": { - "description": "Output only. Whether the file has been shared. Not populated for items in shared drives.", + "description": "Whether the file has been shared. Not populated for items in shared drives.", "type": "boolean" }, "sharedWithMeTime": { @@ -3526,33 +3444,33 @@ }, "sharingUser": { "$ref": "User", - "description": "Output only. The user who shared the file with the requesting user, if applicable." + "description": "The user who shared the file with the requesting user, if applicable." }, "shortcutDetails": { - "description": "Shortcut file details. Only populated for shortcut files, which have the mimeType field set to `application/vnd.google-apps.shortcut`.", + "description": "Shortcut file details. Only populated for shortcut files, which have the mimeType field set to application/vnd.google-apps.shortcut.", "properties": { "targetId": { "description": "The ID of the file that this shortcut points to.", "type": "string" }, "targetMimeType": { - "description": "Output only. The MIME type of the file that this shortcut points to. The value of this field is a snapshot of the target's MIME type, captured when the shortcut is created.", + "description": "The MIME type of the file that this shortcut points to. The value of this field is a snapshot of the target's MIME type, captured when the shortcut is created.", "type": "string" }, "targetResourceKey": { - "description": "Output only. The ResourceKey for the target file.", + "description": "The ResourceKey for the target file.", "type": "string" } }, "type": "object" }, "size": { - "description": "Output only. Size in bytes of blobs and first party editor files. Won't be populated for files that have no size, like shortcuts and folders.", + "description": "The size of the file's content in bytes. This field is populated for files with binary content stored in Google Drive and for Docs Editors files; it's not populated for shortcuts or folders.", "format": "int64", "type": "string" }, "spaces": { - "description": "Output only. The list of spaces which contain the file. The currently supported values are 'drive', 'appDataFolder' and 'photos'.", + "description": "The list of spaces that contain the file. The currently supported values are 'drive', 'appDataFolder' and 'photos'.", "items": { "type": "string" }, @@ -3563,20 +3481,20 @@ "type": "boolean" }, "teamDriveId": { - "description": "Deprecated: Output only. Use `driveId` instead.", + "description": "Deprecated - use driveId instead.", "type": "string" }, "thumbnailLink": { - "description": "Output only. A short-lived link to the file's thumbnail, if available. Typically lasts on the order of hours. Only populated when the requesting app can access the file's content.", + "description": "A short-lived link to the file's thumbnail, if available. Typically lasts on the order of hours. Only populated when the requesting app can access the file's content. If the file isn't shared publicly, the URL returned in Files.thumbnailLink must be fetched using a credentialed request.", "type": "string" }, "thumbnailVersion": { - "description": "Output only. The thumbnail version for use in thumbnail cache invalidation.", + "description": "The thumbnail version for use in thumbnail cache invalidation.", "format": "int64", "type": "string" }, "trashed": { - "description": "Whether the file has been trashed, either explicitly or from a trashed parent folder. Only the owner may trash a file, and other users cannot see files in the owner's trash.", + "description": "Whether the file has been trashed, either explicitly or from a trashed parent folder. Only the owner can trash a file. The trashed item is excluded from all files.list responses returned for any user who does not own the file. However, all users with access to the file can see the trashed item metadata in an API response. All users with access can copy, download, export, and share the file.", "type": "boolean" }, "trashedTime": { @@ -3586,28 +3504,28 @@ }, "trashingUser": { "$ref": "User", - "description": "Output only. If the file has been explicitly trashed, the user who trashed it. Only populated for items in shared drives." + "description": "If the file has been explicitly trashed, the user who trashed it. Only populated for items in shared drives." }, "version": { - "description": "Output only. A monotonically increasing version number for the file. This reflects every change made to the file on the server, even those not visible to the user.", + "description": "A monotonically increasing version number for the file. This reflects every change made to the file on the server, even those not visible to the user.", "format": "int64", "type": "string" }, "videoMediaMetadata": { - "description": "Output only. Additional metadata about video media. This may not be available immediately upon upload.", + "description": "Additional metadata about video media. This might not be available immediately upon upload.", "properties": { "durationMillis": { - "description": "Output only. The duration of the video in milliseconds.", + "description": "The duration of the video in milliseconds.", "format": "int64", "type": "string" }, "height": { - "description": "Output only. The height of the video in pixels.", + "description": "The height of the video in pixels.", "format": "int32", "type": "integer" }, "width": { - "description": "Output only. The width of the video in pixels.", + "description": "The width of the video in pixels.", "format": "int32", "type": "integer" } @@ -3615,28 +3533,28 @@ "type": "object" }, "viewedByMe": { - "description": "Output only. Whether the file has been viewed by this user.", + "description": "Whether this user has viewed the file.", "type": "boolean" }, "viewedByMeTime": { - "description": "The last time the file was viewed by the user (RFC 3339 date-time).", + "description": "The last time the user viewed the file (RFC 3339 date-time).", "format": "date-time", "type": "string" }, "viewersCanCopyContent": { - "description": "Deprecated: Use `copyRequiresWriterPermission` instead.", + "description": "Deprecated - use copyRequiresWriterPermission instead.", "type": "boolean" }, "webContentLink": { - "description": "Output only. A link for downloading the content of the file in a browser. This is only available for files with binary content in Google Drive.", + "description": "A link for downloading the content of the file in a browser. This is only available for files with binary content in Google Drive.", "type": "string" }, "webViewLink": { - "description": "Output only. A link for opening the file in a relevant Google editor or viewer in a browser.", + "description": "A link for opening the file in a relevant Google editor or viewer in a browser.", "type": "string" }, "writersCanShare": { - "description": "Whether users with only `writer` permission can modify the file's permissions. Not populated for items in shared drives.", + "description": "Whether users with only writer permission can modify the file's permissions. Not populated for items in shared drives.", "type": "boolean" } }, @@ -3659,7 +3577,7 @@ }, "kind": { "default": "drive#fileList", - "description": "Identifies what kind of resource this is. Value: the fixed string `\"drive#fileList\"`.", + "description": "Identifies what kind of resource this is. Value: the fixed string \"drive#fileList\".", "type": "string" }, "nextPageToken": { @@ -3682,7 +3600,7 @@ }, "kind": { "default": "drive#generatedIds", - "description": "Identifies what kind of resource this is. Value: the fixed string `\"drive#generatedIds\"`.", + "description": "Identifies what kind of resource this is. Value: the fixed string \"drive#generatedIds\".", "type": "string" }, "space": { @@ -3693,14 +3611,14 @@ "type": "object" }, "Label": { - "description": "Representation of label and label fields.", + "description": "Representation of a label and its fields.", "id": "Label", "properties": { "fields": { "additionalProperties": { "$ref": "LabelField" }, - "description": "A map of the fields on the label, keyed by the field's ID.", + "description": "A map of the label's fields keyed by the field ID.", "type": "object" }, "id": { @@ -3708,6 +3626,7 @@ "type": "string" }, "kind": { + "default": "drive#label", "description": "This is always drive#label", "type": "string" }, @@ -3719,7 +3638,7 @@ "type": "object" }, "LabelField": { - "description": "Representation of field, which is a typed key-value pair.", + "description": "Representation of a label field.", "id": "LabelField", "properties": { "dateString": { @@ -3731,11 +3650,11 @@ "type": "array" }, "id": { - "description": "The identifier of this label field.", + "description": "The identifier of this field.", "type": "string" }, "integer": { - "description": "Only present if `valueType` is `integer`.", + "description": "Only present if valueType is integer.", "items": { "format": "int64", "type": "string" @@ -3743,32 +3662,33 @@ "type": "array" }, "kind": { + "default": "drive#labelField", "description": "This is always drive#labelField.", "type": "string" }, "selection": { - "description": "Only present if `valueType` is `selection`", + "description": "Only present if valueType is selection.", "items": { "type": "string" }, "type": "array" }, "text": { - "description": "Only present if `valueType` is `text`.", + "description": "Only present if valueType is text.", "items": { "type": "string" }, "type": "array" }, "user": { - "description": "Only present if `valueType` is `user`.", + "description": "Only present if valueType is user.", "items": { "$ref": "User" }, "type": "array" }, "valueType": { - "description": "The field type. While new values may be supported in the future, the following are currently allowed: * `dateString` * `integer` * `selection` * `text` * `user`", + "description": "The field type. While new values may be supported in the future, the following are currently allowed: \n- dateString \n- integer \n- selection \n- text \n- user", "type": "string" } }, @@ -3779,15 +3699,16 @@ "id": "LabelFieldModification", "properties": { "fieldId": { - "description": "The ID of the field to be modified.", + "description": "The ID of the Field to be modified.", "type": "string" }, "kind": { + "default": "drive#labelFieldModification", "description": "This is always drive#labelFieldModification.", "type": "string" }, "setDateValues": { - "description": "Replaces the value of a dateString Field with these new values. The string must be in the RFC 3339 full-date format: YYYY-MM-DD.", + "description": "Replaces a dateString field with these new values. The values must be strings in the RFC 3339 full-date format: YYYY-MM-DD.", "items": { "format": "date", "type": "string" @@ -3795,7 +3716,7 @@ "type": "array" }, "setIntegerValues": { - "description": "Replaces the value of an `integer` field with these new values.", + "description": "Replaces an integer field with these new values.", "items": { "format": "int64", "type": "string" @@ -3803,21 +3724,21 @@ "type": "array" }, "setSelectionValues": { - "description": "Replaces a `selection` field with these new values.", + "description": "Replaces a selection field with these new values.", "items": { "type": "string" }, "type": "array" }, "setTextValues": { - "description": "Sets the value of a `text` field.", + "description": "Replaces a text field with these new values.", "items": { "type": "string" }, "type": "array" }, "setUserValues": { - "description": "Replaces a `user` field with these new values. The values must be valid email addresses.", + "description": "Replaces a user field with these new values. The values must be valid email addresses.", "items": { "type": "string" }, @@ -3831,10 +3752,11 @@ "type": "object" }, "LabelList": { - "description": "A list of labels applied to a file.", + "description": "A list of labels.", "id": "LabelList", "properties": { "kind": { + "default": "drive#labelList", "description": "This is always drive#labelList", "type": "string" }, @@ -3864,6 +3786,7 @@ "type": "array" }, "kind": { + "default": "drive#labelModification", "description": "This is always drive#labelModification.", "type": "string" }, @@ -3884,11 +3807,12 @@ "type": "object" }, "ModifyLabelsRequest": { - "description": "A request to modify the set of labels on a file. This request may contain many modifications that will either all succeed or all fail atomically.", + "description": "A request to modify the set of labels on a file. This request may contain many modifications that will either all succeed or all fail transactionally.", "id": "ModifyLabelsRequest", "properties": { "kind": { - "description": "This is always drive#modifyLabelsRequest.", + "default": "drive#modifyLabelsRequest", + "description": "This is always drive#modifyLabelsRequest", "type": "string" }, "labelModifications": { @@ -3906,6 +3830,7 @@ "id": "ModifyLabelsResponse", "properties": { "kind": { + "default": "drive#modifyLabelsResponse", "description": "This is always drive#modifyLabelsResponse", "type": "string" }, @@ -3920,23 +3845,23 @@ "type": "object" }, "Permission": { - "description": "A permission for a file. A permission grants a user, group, domain or the world access to a file or a folder hierarchy.", + "description": "A permission for a file. A permission grants a user, group, domain, or the world access to a file or a folder hierarchy.", "id": "Permission", "properties": { "allowFileDiscovery": { - "description": "Whether the permission allows the file to be discovered through search. This is only applicable for permissions of type `domain` or `anyone`.", + "description": "Whether the permission allows the file to be discovered through search. This is only applicable for permissions of type domain or anyone.", "type": "boolean" }, "deleted": { - "description": "Output only. Whether the account associated with this permission has been deleted. This field only pertains to user and group permissions.", + "description": "Whether the account associated with this permission has been deleted. This field only pertains to user and group permissions.", "type": "boolean" }, "displayName": { - "description": "Output only. The \"pretty\" name of the value of the permission. The following is a list of examples for each type of permission: * `user` - User's full name, as defined for their Google account, such as \"Joe Smith.\" * `group` - Name of the Google Group, such as \"The Company Administrators.\" * `domain` - String domain name, such as \"thecompany.com.\" * `anyone` - No `displayName` is present.", + "description": "The \"pretty\" name of the value of the permission. The following is a list of examples for each type of permission: \n- user - User's full name, as defined for their Google Account, such as \"Joe Smith.\" \n- group - Name of the Google Group, such as \"The Company Administrators.\" \n- domain - String domain name, such as \"your-company.com.\" \n- anyone - No displayName is present.", "type": "string" }, "domain": { - "description": "The domain to which this permission refers.", + "description": "The domain to which this permission refers. The following options are currently allowed: \n- The entire domain, such as \"your-company.com.\" \n- A target audience, such as \"ID.audience.googledomains.com.\"", "type": "string" }, "emailAddress": { @@ -3944,41 +3869,41 @@ "type": "string" }, "expirationTime": { - "description": "The time at which this permission will expire (RFC 3339 date-time). Expiration times have the following restrictions: - They can only be set on user and group permissions - The time must be in the future - The time cannot be more than a year in the future", + "description": "The time at which this permission will expire (RFC 3339 date-time). Expiration times have the following restrictions: \n- They cannot be set on shared drive items. \n- They can only be set on user and group permissions. \n- The time must be in the future. \n- The time cannot be more than one year in the future.", "format": "date-time", "type": "string" }, "id": { - "description": "Output only. The ID of this permission. This is a unique identifier for the grantee, and is published in User resources as `permissionId`. IDs should be treated as opaque values.", + "description": "The ID of this permission. This is a unique identifier for the grantee, and is published in User resources as permissionId. IDs should be treated as opaque values.", "type": "string" }, "kind": { "default": "drive#permission", - "description": "Output only. Identifies what kind of resource this is. Value: the fixed string `\"drive#permission\"`.", + "description": "Identifies what kind of resource this is. Value: the fixed string \"drive#permission\".", "type": "string" }, "pendingOwner": { - "description": "Whether the account associated with this permission is a pending owner. Only populated for `user` type permissions for files that are not in a shared drive.", + "description": "Whether the account associated with this permission is a pending owner. Only populated for user type permissions for files that aren't in a shared drive.", "type": "boolean" }, "permissionDetails": { - "description": "Output only. Details of whether the permissions on this shared drive item are inherited or directly on this item. This is an output-only field which is present only for shared drive items.", + "description": "Details of whether the permissions on this shared drive item are inherited or are directly on this item. This is an output-only field that's present only for shared drive items.", "items": { "properties": { "inherited": { - "description": "Output only. Whether this permission is inherited. This field is always populated. This is an output-only field.", + "description": "Whether this permission is inherited. This field is always populated. This is an output-only field.", "type": "boolean" }, "inheritedFrom": { - "description": "Output only. The ID of the item from which this permission is inherited. This is an output-only field.", + "description": "The ID of the item from which this permission is inherited. This is an output-only field.", "type": "string" }, "permissionType": { - "description": "Output only. The permission type for this user. While new values may be added in future, the following are currently possible: * `file` * `member`", + "description": "The permission type for this user. While new values may be added in future, the following are currently allowed: \n- file \n- member", "type": "string" }, "role": { - "description": "Output only. The primary role for this user. While new values may be added in the future, the following are currently possible: * `organizer` * `fileOrganizer` * `writer` * `commenter` * `reader`", + "description": "The primary role for this user. While new values may be added in the future, the following are currently allowed: \n- organizer \n- fileOrganizer \n- writer \n- commenter \n- reader", "type": "string" } }, @@ -3988,7 +3913,7 @@ "type": "array" }, "photoLink": { - "description": "Output only. A link to the user's profile photo, if available.", + "description": "A link to the user's profile photo, if available.", "type": "string" }, "role": { @@ -3997,27 +3922,27 @@ "drive.permissions.create" ] }, - "description": "The role granted by this permission. While new values may be supported in the future, the following are currently allowed: * `owner` * `organizer` * `fileOrganizer` * `writer` * `commenter` * `reader`", + "description": "The role granted by this permission. While new values may be supported in the future, the following are currently allowed: \n- owner \n- organizer \n- fileOrganizer \n- writer \n- commenter \n- reader", "type": "string" }, "teamDrivePermissionDetails": { - "description": "Output only. Deprecated: Output only. Use `permissionDetails` instead.", + "description": "Deprecated - use permissionDetails instead.", "items": { "properties": { "inherited": { - "description": "Deprecated: Output only. Use `permissionDetails/inherited` instead.", + "description": "Deprecated - use permissionDetails/inherited instead.", "type": "boolean" }, "inheritedFrom": { - "description": "Deprecated: Output only. Use `permissionDetails/inheritedFrom` instead.", + "description": "Deprecated - use permissionDetails/inheritedFrom instead.", "type": "string" }, "role": { - "description": "Deprecated: Output only. Use `permissionDetails/role` instead.", + "description": "Deprecated - use permissionDetails/role instead.", "type": "string" }, "teamDrivePermissionType": { - "description": "Deprecated: Output only. Use `permissionDetails/permissionType` instead.", + "description": "Deprecated - use permissionDetails/permissionType instead.", "type": "string" } }, @@ -4032,11 +3957,11 @@ "drive.permissions.create" ] }, - "description": "The type of the grantee. Valid values are: * `user` * `group` * `domain` * `anyone` When creating a permission, if `type` is `user` or `group`, you must provide an `emailAddress` for the user or group. When `type` is `domain`, you must provide a `domain`. There isn't extra information required for an `anyone` type.", + "description": "The type of the grantee. Valid values are: \n- user \n- group \n- domain \n- anyone When creating a permission, if type is user or group, you must provide an emailAddress for the user or group. When type is domain, you must provide a domain. There isn't extra information required for the anyone type.", "type": "string" }, "view": { - "description": "Indicates the view for this permission. Only populated for permissions that belong to a view. 'published' is the only supported value.", + "description": "Indicates the view for this permission. Only populated for permissions that belong to a view. published is the only supported value.", "type": "string" } }, @@ -4048,7 +3973,7 @@ "properties": { "kind": { "default": "drive#permissionList", - "description": "Identifies what kind of resource this is. Value: the fixed string `\"drive#permissionList\"`.", + "description": "Identifies what kind of resource this is. Value: the fixed string \"drive#permissionList\".", "type": "string" }, "nextPageToken": { @@ -4070,12 +3995,12 @@ "id": "Reply", "properties": { "action": { - "description": "The action the reply performed to the parent comment. Valid values are: * `resolve` * `reopen`", + "description": "The action the reply performed to the parent comment. Valid values are: \n- resolve \n- reopen", "type": "string" }, "author": { "$ref": "User", - "description": "Output only. The author of the reply. The author's email address and permission ID will not be populated." + "description": "The author of the reply. The author's email address and permission ID will not be populated." }, "content": { "annotations": { @@ -4083,7 +4008,7 @@ "drive.replies.update" ] }, - "description": "The plain text content of the reply. This field is used for setting the content, while `htmlContent` should be displayed. This is required on creates if no `action` is specified.", + "description": "The plain text content of the reply. This field is used for setting the content, while htmlContent should be displayed. This is required on creates if no action is specified.", "type": "string" }, "createdTime": { @@ -4092,20 +4017,20 @@ "type": "string" }, "deleted": { - "description": "Output only. Whether the reply has been deleted. A deleted reply has no content.", + "description": "Whether the reply has been deleted. A deleted reply has no content.", "type": "boolean" }, "htmlContent": { - "description": "Output only. The content of the reply with HTML formatting.", + "description": "The content of the reply with HTML formatting.", "type": "string" }, "id": { - "description": "Output only. The ID of the reply.", + "description": "The ID of the reply.", "type": "string" }, "kind": { "default": "drive#reply", - "description": "Output only. Identifies what kind of resource this is. Value: the fixed string `\"drive#reply\"`.", + "description": "Identifies what kind of resource this is. Value: the fixed string \"drive#reply\".", "type": "string" }, "modifiedTime": { @@ -4122,7 +4047,7 @@ "properties": { "kind": { "default": "drive#replyList", - "description": "Identifies what kind of resource this is. Value: the fixed string `\"drive#replyList\"`.", + "description": "Identifies what kind of resource this is. Value: the fixed string \"drive#replyList\".", "type": "string" }, "nextPageToken": { @@ -4145,34 +4070,35 @@ "properties": { "exportLinks": { "additionalProperties": { + "description": "A mapping from export format to URL", "type": "string" }, - "description": "Output only. Links for exporting Docs Editors files to specific formats.", + "description": "Links for exporting Docs Editors files to specific formats.", "type": "object" }, "id": { - "description": "Output only. The ID of the revision.", + "description": "The ID of the revision.", "type": "string" }, "keepForever": { - "description": "Whether to keep this revision forever, even if it is no longer the head revision. If not set, the revision will be automatically purged 30 days after newer content is uploaded. This can be set on a maximum of 200 revisions for a file. This field is only applicable to files with binary content in Drive.", + "description": "Whether to keep this revision forever, even if it is no longer the head revision. If not set, the revision will be automatically purged 30 days after newer content is uploaded. This can be set on a maximum of 200 revisions for a file.\nThis field is only applicable to files with binary content in Drive.", "type": "boolean" }, "kind": { "default": "drive#revision", - "description": "Output only. Identifies what kind of resource this is. Value: the fixed string `\"drive#revision\"`.", + "description": "Identifies what kind of resource this is. Value: the fixed string \"drive#revision\".", "type": "string" }, "lastModifyingUser": { "$ref": "User", - "description": "Output only. The last user to modify this revision." + "description": "The last user to modify this revision." }, "md5Checksum": { - "description": "Output only. The MD5 checksum of the revision's content. This is only applicable to files with binary content in Drive.", + "description": "The MD5 checksum of the revision's content. This is only applicable to files with binary content in Drive.", "type": "string" }, "mimeType": { - "description": "Output only. The MIME type of the revision.", + "description": "The MIME type of the revision.", "type": "string" }, "modifiedTime": { @@ -4181,7 +4107,7 @@ "type": "string" }, "originalFilename": { - "description": "Output only. The original filename used to create this revision. This is only applicable to files with binary content in Drive.", + "description": "The original filename used to create this revision. This is only applicable to files with binary content in Drive.", "type": "string" }, "publishAuto": { @@ -4193,7 +4119,7 @@ "type": "boolean" }, "publishedLink": { - "description": "Output only. A link to the published revision. This is only populated for Google Sites files.", + "description": "A link to the published revision. This is only populated for Google Sites files.", "type": "string" }, "publishedOutsideDomain": { @@ -4201,7 +4127,7 @@ "type": "boolean" }, "size": { - "description": "Output only. The size of the revision's content in bytes. This is only applicable to files with binary content in Drive.", + "description": "The size of the revision's content in bytes. This is only applicable to files with binary content in Drive.", "format": "int64", "type": "string" } @@ -4214,7 +4140,7 @@ "properties": { "kind": { "default": "drive#revisionList", - "description": "Identifies what kind of resource this is. Value: the fixed string `\"drive#revisionList\"`.", + "description": "Identifies what kind of resource this is. Value: the fixed string \"drive#revisionList\".", "type": "string" }, "nextPageToken": { @@ -4236,7 +4162,7 @@ "properties": { "kind": { "default": "drive#startPageToken", - "description": "Identifies what kind of resource this is. Value: the fixed string `\"drive#startPageToken\"`.", + "description": "Identifies what kind of resource this is. Value: the fixed string \"drive#startPageToken\".", "type": "string" }, "startPageToken": { @@ -4251,7 +4177,7 @@ "id": "TeamDrive", "properties": { "backgroundImageFile": { - "description": "An image file and cropping parameters from which a background image for this Team Drive is set. This is a write only field; it can only be set on `drive.teamdrives.update` requests that don't set `themeId`. When specified, all fields of the `backgroundImageFile` must be set.", + "description": "An image file and cropping parameters from which a background image for this Team Drive is set. This is a write only field; it can only be set on drive.teamdrives.update requests that don't set themeId. When specified, all fields of the backgroundImageFile must be set.", "properties": { "id": { "description": "The ID of an image file in Drive to use for the background image.", @@ -4287,15 +4213,15 @@ "type": "boolean" }, "canChangeCopyRequiresWriterPermissionRestriction": { - "description": "Whether the current user can change the `copyRequiresWriterPermission` restriction of this Team Drive.", + "description": "Whether the current user can change the copyRequiresWriterPermission restriction of this Team Drive.", "type": "boolean" }, "canChangeDomainUsersOnlyRestriction": { - "description": "Whether the current user can change the `domainUsersOnly` restriction of this Team Drive.", + "description": "Whether the current user can change the domainUsersOnly restriction of this Team Drive.", "type": "boolean" }, "canChangeSharingFoldersRequiresOrganizerPermissionRestriction": { - "description": "Whether the current user can change the `sharingFoldersRequiresOrganizerPermission` restriction of this Team Drive.", + "description": "Whether the current user can change the sharingFoldersRequiresOrganizerPermission restriction of this Team Drive.", "type": "boolean" }, "canChangeTeamDriveBackground": { @@ -4303,7 +4229,7 @@ "type": "boolean" }, "canChangeTeamMembersOnlyRestriction": { - "description": "Whether the current user can change the `teamMembersOnly` restriction of this Team Drive.", + "description": "Whether the current user can change the teamMembersOnly restriction of this Team Drive.", "type": "boolean" }, "canComment": { @@ -4343,7 +4269,7 @@ "type": "boolean" }, "canRemoveChildren": { - "description": "Deprecated: Use `canDeleteChildren` or `canTrashChildren` instead.", + "description": "Deprecated - use canDeleteChildren or canTrashChildren instead.", "type": "boolean" }, "canRename": { @@ -4370,7 +4296,7 @@ "type": "object" }, "colorRgb": { - "description": "The color of this Team Drive as an RGB hex string. It can only be set on a `drive.teamdrives.update` request that does not set `themeId`.", + "description": "The color of this Team Drive as an RGB hex string. It can only be set on a drive.teamdrives.update request that does not set themeId.", "type": "string" }, "createdTime": { @@ -4384,15 +4310,20 @@ }, "kind": { "default": "drive#teamDrive", - "description": "Identifies what kind of resource this is. Value: the fixed string `\"drive#teamDrive\"`.", + "description": "Identifies what kind of resource this is. Value: the fixed string \"drive#teamDrive\".", "type": "string" }, "name": { + "annotations": { + "required": [ + "drive.teamdrives.create" + ] + }, "description": "The name of this Team Drive.", "type": "string" }, "orgUnitId": { - "description": "The organizational unit of this shared drive. This field is only populated on `drives.list` responses when the `useDomainAdminAccess` parameter is set to `true`.", + "description": "The organizational unit of this shared drive. This field is only populated on drives.list responses when the useDomainAdminAccess parameter is set to true.", "type": "string" }, "restrictions": { @@ -4403,7 +4334,7 @@ "type": "boolean" }, "copyRequiresWriterPermission": { - "description": "Whether the options to copy, print, or download files inside this Team Drive, should be disabled for readers and commenters. When this restriction is set to `true`, it will override the similarly named field to `true` for any file inside this Team Drive.", + "description": "Whether the options to copy, print, or download files inside this Team Drive, should be disabled for readers and commenters. When this restriction is set to true, it will override the similarly named field to true for any file inside this Team Drive.", "type": "boolean" }, "domainUsersOnly": { @@ -4422,7 +4353,7 @@ "type": "object" }, "themeId": { - "description": "The ID of the theme from which the background image and color will be set. The set of possible `teamDriveThemes` can be retrieved from a `drive.about.get` response. When not specified on a `drive.teamdrives.create` request, a random theme is chosen from which the background image and color are set. This is a write-only field; it can only be set on requests that don't set `colorRgb` or `backgroundImageFile`.", + "description": "The ID of the theme from which the background image and color will be set. The set of possible teamDriveThemes can be retrieved from a drive.about.get response. When not specified on a drive.teamdrives.create request, a random theme is chosen from which the background image and color are set. This is a write-only field; it can only be set on requests that don't set colorRgb or backgroundImageFile.", "type": "string" } }, @@ -4434,7 +4365,7 @@ "properties": { "kind": { "default": "drive#teamDriveList", - "description": "Identifies what kind of resource this is. Value: the fixed string `\"drive#teamDriveList\"`.", + "description": "Identifies what kind of resource this is. Value: the fixed string \"drive#teamDriveList\".", "type": "string" }, "nextPageToken": { @@ -4456,35 +4387,35 @@ "id": "User", "properties": { "displayName": { - "description": "Output only. A plain text displayable name for this user.", + "description": "A plain text displayable name for this user.", "type": "string" }, "emailAddress": { - "description": "Output only. The email address of the user. This may not be present in certain contexts if the user has not made their email address visible to the requester.", + "description": "The email address of the user. This may not be present in certain contexts if the user has not made their email address visible to the requester.", "type": "string" }, "kind": { "default": "drive#user", - "description": "Output only. Identifies what kind of resource this is. Value: the fixed string `\"drive#user\"`.", + "description": "Identifies what kind of resource this is. Value: the fixed string \"drive#user\".", "type": "string" }, "me": { - "description": "Output only. Whether this user is the requesting user.", + "description": "Whether this user is the requesting user.", "type": "boolean" }, "permissionId": { - "description": "Output only. The user's ID as visible in Permission resources.", + "description": "The user's ID as visible in Permission resources.", "type": "string" }, "photoLink": { - "description": "Output only. A link to the user's profile photo, if available.", + "description": "A link to the user's profile photo, if available.", "type": "string" } }, "type": "object" } }, - "servicePath": "", - "title": "Google Drive API", + "servicePath": "drive/v3/", + "title": "Drive API", "version": "v3" } \ No newline at end of file diff --git a/drive/v3/drive-gen.go b/drive/v3/drive-gen.go index 16f3c62d61b..b538a712f20 100644 --- a/drive/v3/drive-gen.go +++ b/drive/v3/drive-gen.go @@ -4,7 +4,7 @@ // Code generated file. DO NOT EDIT. -// Package drive provides access to the Google Drive API. +// Package drive provides access to the Drive API. // // For product documentation, see: https://developers.google.com/drive/ // @@ -80,8 +80,7 @@ var _ = internal.Version const apiId = "drive:v3" const apiName = "drive" const apiVersion = "v3" -const basePath = "https://www.googleapis.com/" -const mtlsBasePath = "https://www.mtls.googleapis.com/" +const basePath = "https://www.googleapis.com/drive/v3/" // OAuth2 scopes used by this API. const ( @@ -127,7 +126,6 @@ func NewService(ctx context.Context, opts ...option.ClientOption) (*Service, err // NOTE: prepend, so we don't override user-specified scopes. opts = append([]option.ClientOption{scopesOption}, opts...) opts = append(opts, internaloption.WithDefaultEndpoint(basePath)) - opts = append(opts, internaloption.WithDefaultMTLSEndpoint(mtlsBasePath)) client, endpoint, err := htransport.NewClient(ctx, opts...) if err != nil { return nil, err @@ -297,7 +295,7 @@ type About struct { // CanCreateDrives: Whether the user can create shared drives. CanCreateDrives bool `json:"canCreateDrives,omitempty"` - // CanCreateTeamDrives: Deprecated: Use `canCreateDrives` instead. + // CanCreateTeamDrives: Deprecated - use canCreateDrives instead. CanCreateTeamDrives bool `json:"canCreateTeamDrives,omitempty"` // DriveThemes: A list of themes that are supported for shared drives. @@ -329,7 +327,7 @@ type About struct { // are measured in bytes. StorageQuota *AboutStorageQuota `json:"storageQuota,omitempty"` - // TeamDriveThemes: Deprecated: Use `driveThemes` instead. + // TeamDriveThemes: Deprecated - use driveThemes instead. TeamDriveThemes []*AboutTeamDriveThemes `json:"teamDriveThemes,omitempty"` // User: The authenticated user. @@ -436,14 +434,14 @@ func (s *AboutStorageQuota) MarshalJSON() ([]byte, error) { } type AboutTeamDriveThemes struct { - // BackgroundImageLink: Deprecated: Use - // `driveThemes/backgroundImageLink` instead. + // BackgroundImageLink: Deprecated - use driveThemes/backgroundImageLink + // instead. BackgroundImageLink string `json:"backgroundImageLink,omitempty"` - // ColorRgb: Deprecated: Use `driveThemes/colorRgb` instead. + // ColorRgb: Deprecated - use driveThemes/colorRgb instead. ColorRgb string `json:"colorRgb,omitempty"` - // Id: Deprecated: Use `driveThemes/id` instead. + // Id: Deprecated - use driveThemes/id instead. Id string `json:"id,omitempty"` // ForceSendFields is a list of field names (e.g. "BackgroundImageLink") @@ -472,8 +470,8 @@ func (s *AboutTeamDriveThemes) MarshalJSON() ([]byte, error) { // Change: A change to a file or shared drive. type Change struct { - // ChangeType: The type of the change. Possible values are `file` and - // `drive`. + // ChangeType: The type of the change. Possible values are file and + // drive. ChangeType string `json:"changeType,omitempty"` // Drive: The updated state of the shared drive. Present if the @@ -499,16 +497,16 @@ type Change struct { // list of changes, for example by deletion or loss of access. Removed bool `json:"removed,omitempty"` - // TeamDrive: Deprecated: Use `drive` instead. + // TeamDrive: Deprecated - use drive instead. TeamDrive *TeamDrive `json:"teamDrive,omitempty"` - // TeamDriveId: Deprecated: Use `driveId` instead. + // TeamDriveId: Deprecated - use driveId instead. TeamDriveId string `json:"teamDriveId,omitempty"` // Time: The time of this change (RFC 3339 date-time). Time string `json:"time,omitempty"` - // Type: Deprecated: Use `changeType` instead. + // Type: Deprecated - use changeType instead. Type string `json:"type,omitempty"` // ForceSendFields is a list of field names (e.g. "ChangeType") to @@ -583,7 +581,7 @@ func (s *ChangeList) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// Channel: A notification channel used to watch for resource changes. +// Channel: An notification channel used to watch for resource changes. type Channel struct { // Address: The address where notifications are delivered for this // channel. @@ -597,7 +595,7 @@ type Channel struct { Id string `json:"id,omitempty"` // Kind: Identifies this as a notification channel used to watch for - // changes to a resource, which is `api#channel`. + // changes to a resource, which is "api#channel". Kind string `json:"kind,omitempty"` // Params: Additional parameters controlling delivery channel behavior. @@ -619,7 +617,9 @@ type Channel struct { // notification delivered over this channel. Optional. Token string `json:"token,omitempty"` - // Type: The type of delivery mechanism used for this channel. + // Type: The type of delivery mechanism used for this channel. Valid + // values are "web_hook" (or "webhook"). Both values refer to a channel + // where Http requests are used to deliver messages. Type string `json:"type,omitempty"` // ServerResponse contains the HTTP response code and headers from the @@ -652,35 +652,34 @@ func (s *Channel) MarshalJSON() ([]byte, error) { // Comment: A comment on a file. type Comment struct { // Anchor: A region of the document represented as a JSON string. For - // details on defining anchor properties, refer to Manage comments and - // replies (https://developers.google.com/drive/api/v3/manage-comments). + // details on defining anchor properties, refer to Add comments and + // replies. Anchor string `json:"anchor,omitempty"` - // Author: Output only. The author of the comment. The author's email - // address and permission ID will not be populated. + // Author: The author of the comment. The author's email address and + // permission ID will not be populated. Author *User `json:"author,omitempty"` // Content: The plain text content of the comment. This field is used - // for setting the content, while `htmlContent` should be displayed. + // for setting the content, while htmlContent should be displayed. Content string `json:"content,omitempty"` // CreatedTime: The time at which the comment was created (RFC 3339 // date-time). CreatedTime string `json:"createdTime,omitempty"` - // Deleted: Output only. Whether the comment has been deleted. A deleted - // comment has no content. + // Deleted: Whether the comment has been deleted. A deleted comment has + // no content. Deleted bool `json:"deleted,omitempty"` - // HtmlContent: Output only. The content of the comment with HTML - // formatting. + // HtmlContent: The content of the comment with HTML formatting. HtmlContent string `json:"htmlContent,omitempty"` - // Id: Output only. The ID of the comment. + // Id: The ID of the comment. Id string `json:"id,omitempty"` - // Kind: Output only. Identifies what kind of resource this is. Value: - // the fixed string "drive#comment". + // Kind: Identifies what kind of resource this is. Value: the fixed + // string "drive#comment". Kind string `json:"kind,omitempty"` // ModifiedTime: The last time the comment or any of its replies was @@ -692,12 +691,12 @@ type Comment struct { // this would be the text at the location of the comment. QuotedFileContent *CommentQuotedFileContent `json:"quotedFileContent,omitempty"` - // Replies: Output only. The full list of replies to the comment in - // chronological order. + // Replies: The full list of replies to the comment in chronological + // order. Replies []*Reply `json:"replies,omitempty"` - // Resolved: Output only. Whether the comment has been resolved by one - // of its replies. + // Resolved: Whether the comment has been resolved by one of its + // replies. Resolved bool `json:"resolved,omitempty"` // ServerResponse contains the HTTP response code and headers from the @@ -815,19 +814,19 @@ type ContentRestriction struct { ReadOnly bool `json:"readOnly,omitempty"` // Reason: Reason for why the content of the file is restricted. This is - // only mutable on requests that also set `readOnly=true`. + // only mutable on requests that also set readOnly=true. Reason string `json:"reason,omitempty"` - // RestrictingUser: Output only. The user who set the content - // restriction. Only populated if `readOnly` is true. + // RestrictingUser: The user who set the content restriction. Only + // populated if readOnly is true. RestrictingUser *User `json:"restrictingUser,omitempty"` // RestrictionTime: The time at which the content restriction was set // (formatted RFC 3339 timestamp). Only populated if readOnly is true. RestrictionTime string `json:"restrictionTime,omitempty"` - // Type: Output only. The type of the content restriction. Currently the - // only possible value is `globalContentRestriction`. + // Type: The type of the content restriction. Currently the only + // possible value is globalContentRestriction. Type string `json:"type,omitempty"` // ForceSendFields is a list of field names (e.g. "ReadOnly") to @@ -856,23 +855,21 @@ func (s *ContentRestriction) MarshalJSON() ([]byte, error) { // Drive: Representation of a shared drive. type Drive struct { // BackgroundImageFile: An image file and cropping parameters from which - // a background image for this shared drive is set. This is a write only - // field; it can only be set on `drive.drives.update` requests that - // don't set `themeId`. When specified, all fields of the - // `backgroundImageFile` must be set. + // a background image for this shared drive is set. This is a write-only + // field; it can only be set on drive.drives.update requests that don't + // set themeId. When specified, all fields of the backgroundImageFile + // must be set. BackgroundImageFile *DriveBackgroundImageFile `json:"backgroundImageFile,omitempty"` - // BackgroundImageLink: Output only. A short-lived link to this shared - // drive's background image. + // BackgroundImageLink: A short-lived link to this shared drive's + // background image. BackgroundImageLink string `json:"backgroundImageLink,omitempty"` - // Capabilities: Output only. Capabilities the current user has on this - // shared drive. + // Capabilities: Capabilities the current user has on this shared drive. Capabilities *DriveCapabilities `json:"capabilities,omitempty"` // ColorRgb: The color of this shared drive as an RGB hex string. It can - // only be set on a `drive.drives.update` request that does not set - // `themeId`. + // only be set on drive.drives.update requests that don't set themeId. ColorRgb string `json:"colorRgb,omitempty"` // CreatedTime: The time at which the shared drive was created (RFC 3339 @@ -882,20 +879,20 @@ type Drive struct { // Hidden: Whether the shared drive is hidden from default view. Hidden bool `json:"hidden,omitempty"` - // Id: Output only. The ID of this shared drive which is also the ID of - // the top level folder of this shared drive. + // Id: The ID of this shared drive which is also the ID of the top level + // folder of this shared drive. Id string `json:"id,omitempty"` - // Kind: Output only. Identifies what kind of resource this is. Value: - // the fixed string "drive#drive". + // Kind: Identifies what kind of resource this is. Value: the fixed + // string "drive#drive". Kind string `json:"kind,omitempty"` // Name: The name of this shared drive. Name string `json:"name,omitempty"` - // OrgUnitId: Output only. The organizational unit of this shared drive. - // This field is only populated on `drives.list` responses when the - // `useDomainAdminAccess` parameter is set to `true`. + // OrgUnitId: The organizational unit of this shared drive. This field + // is only populated on drives.list responses when the + // useDomainAdminAccess parameter is set to true. OrgUnitId string `json:"orgUnitId,omitempty"` // Restrictions: A set of restrictions that apply to this shared drive @@ -903,12 +900,12 @@ type Drive struct { Restrictions *DriveRestrictions `json:"restrictions,omitempty"` // ThemeId: The ID of the theme from which the background image and - // color will be set. The set of possible `driveThemes` can be retrieved - // from a `drive.about.get` response. When not specified on a - // `drive.drives.create` request, a random theme is chosen from which - // the background image and color are set. This is a write-only field; - // it can only be set on requests that don't set `colorRgb` or - // `backgroundImageFile`. + // color are set. The set of possible driveThemes can be retrieved from + // a drive.about.get response. When not specified on a + // drive.drives.create request, a random theme is chosen from which the + // background image and color are set. This is a write-only field; it + // can only be set on requests that don't set colorRgb or + // backgroundImageFile. ThemeId string `json:"themeId,omitempty"` // ServerResponse contains the HTTP response code and headers from the @@ -941,9 +938,9 @@ func (s *Drive) MarshalJSON() ([]byte, error) { // DriveBackgroundImageFile: An image file and cropping parameters from // which a background image for this shared drive is set. This is a -// write only field; it can only be set on `drive.drives.update` -// requests that don't set `themeId`. When specified, all fields of the -// `backgroundImageFile` must be set. +// write-only field; it can only be set on drive.drives.update requests +// that don't set themeId. When specified, all fields of the +// backgroundImageFile must be set. type DriveBackgroundImageFile struct { // Id: The ID of an image file in Google Drive to use for the background // image. @@ -1011,93 +1008,90 @@ func (s *DriveBackgroundImageFile) UnmarshalJSON(data []byte) error { return nil } -// DriveCapabilities: Output only. Capabilities the current user has on -// this shared drive. +// DriveCapabilities: Capabilities the current user has on this shared +// drive. type DriveCapabilities struct { - // CanAddChildren: Output only. Whether the current user can add - // children to folders in this shared drive. + // CanAddChildren: Whether the current user can add children to folders + // in this shared drive. CanAddChildren bool `json:"canAddChildren,omitempty"` - // CanChangeCopyRequiresWriterPermissionRestriction: Output only. - // Whether the current user can change the - // `copyRequiresWriterPermission` restriction of this shared drive. + // CanChangeCopyRequiresWriterPermissionRestriction: Whether the current + // user can change the copyRequiresWriterPermission restriction of this + // shared drive. CanChangeCopyRequiresWriterPermissionRestriction bool `json:"canChangeCopyRequiresWriterPermissionRestriction,omitempty"` - // CanChangeDomainUsersOnlyRestriction: Output only. Whether the current - // user can change the `domainUsersOnly` restriction of this shared - // drive. + // CanChangeDomainUsersOnlyRestriction: Whether the current user can + // change the domainUsersOnly restriction of this shared drive. CanChangeDomainUsersOnlyRestriction bool `json:"canChangeDomainUsersOnlyRestriction,omitempty"` - // CanChangeDriveBackground: Output only. Whether the current user can - // change the background of this shared drive. + // CanChangeDriveBackground: Whether the current user can change the + // background of this shared drive. CanChangeDriveBackground bool `json:"canChangeDriveBackground,omitempty"` - // CanChangeDriveMembersOnlyRestriction: Output only. Whether the - // current user can change the `driveMembersOnly` restriction of this - // shared drive. + // CanChangeDriveMembersOnlyRestriction: Whether the current user can + // change the driveMembersOnly restriction of this shared drive. CanChangeDriveMembersOnlyRestriction bool `json:"canChangeDriveMembersOnlyRestriction,omitempty"` - // CanChangeSharingFoldersRequiresOrganizerPermissionRestriction: Output - // only. Whether the current user can change the - // `sharingFoldersRequiresOrganizerPermission` restriction of this - // shared drive. + // CanChangeSharingFoldersRequiresOrganizerPermissionRestriction: + // Whether the current user can change the + // sharingFoldersRequiresOrganizerPermission restriction of this shared + // drive. CanChangeSharingFoldersRequiresOrganizerPermissionRestriction bool `json:"canChangeSharingFoldersRequiresOrganizerPermissionRestriction,omitempty"` - // CanComment: Output only. Whether the current user can comment on - // files in this shared drive. + // CanComment: Whether the current user can comment on files in this + // shared drive. CanComment bool `json:"canComment,omitempty"` - // CanCopy: Output only. Whether the current user can copy files in this - // shared drive. + // CanCopy: Whether the current user can copy files in this shared + // drive. CanCopy bool `json:"canCopy,omitempty"` - // CanDeleteChildren: Output only. Whether the current user can delete - // children from folders in this shared drive. + // CanDeleteChildren: Whether the current user can delete children from + // folders in this shared drive. CanDeleteChildren bool `json:"canDeleteChildren,omitempty"` - // CanDeleteDrive: Output only. Whether the current user can delete this - // shared drive. Attempting to delete the shared drive may still fail if - // there are untrashed items inside the shared drive. + // CanDeleteDrive: Whether the current user can delete this shared + // drive. Attempting to delete the shared drive may still fail if there + // are untrashed items inside the shared drive. CanDeleteDrive bool `json:"canDeleteDrive,omitempty"` - // CanDownload: Output only. Whether the current user can download files - // in this shared drive. + // CanDownload: Whether the current user can download files in this + // shared drive. CanDownload bool `json:"canDownload,omitempty"` - // CanEdit: Output only. Whether the current user can edit files in this - // shared drive + // CanEdit: Whether the current user can edit files in this shared drive CanEdit bool `json:"canEdit,omitempty"` - // CanListChildren: Output only. Whether the current user can list the - // children of folders in this shared drive. + // CanListChildren: Whether the current user can list the children of + // folders in this shared drive. CanListChildren bool `json:"canListChildren,omitempty"` - // CanManageMembers: Output only. Whether the current user can add - // members to this shared drive or remove them or change their role. + // CanManageMembers: Whether the current user can add members to this + // shared drive or remove them or change their role. CanManageMembers bool `json:"canManageMembers,omitempty"` - // CanReadRevisions: Output only. Whether the current user can read the - // revisions resource of files in this shared drive. + // CanReadRevisions: Whether the current user can read the revisions + // resource of files in this shared drive. CanReadRevisions bool `json:"canReadRevisions,omitempty"` - // CanRename: Output only. Whether the current user can rename files or - // folders in this shared drive. + // CanRename: Whether the current user can rename files or folders in + // this shared drive. CanRename bool `json:"canRename,omitempty"` - // CanRenameDrive: Output only. Whether the current user can rename this - // shared drive. + // CanRenameDrive: Whether the current user can rename this shared + // drive. CanRenameDrive bool `json:"canRenameDrive,omitempty"` - // CanResetDriveRestrictions: Output only. Whether the current user can - // reset the shared drive restrictions to defaults. + // CanResetDriveRestrictions: Whether the current user can reset the + // shared drive restrictions to defaults. CanResetDriveRestrictions bool `json:"canResetDriveRestrictions,omitempty"` - // CanShare: Output only. Whether the current user can share files or - // folders in this shared drive. + // CanShare: Whether the current user can share files or folders in this + // shared drive. CanShare bool `json:"canShare,omitempty"` - // CanTrashChildren: Output only. Whether the current user can trash - // children from folders in this shared drive. + // CanTrashChildren: Whether the current user can trash children from + // folders in this shared drive. CanTrashChildren bool `json:"canTrashChildren,omitempty"` // ForceSendFields is a list of field names (e.g. "CanAddChildren") to @@ -1133,9 +1127,9 @@ type DriveRestrictions struct { // CopyRequiresWriterPermission: Whether the options to copy, print, or // download files inside this shared drive, should be disabled for - // readers and commenters. When this restriction is set to `true`, it - // will override the similarly named field to `true` for any file inside - // this shared drive. + // readers and commenters. When this restriction is set to true, it will + // override the similarly named field to true for any file inside this + // shared drive. CopyRequiresWriterPermission bool `json:"copyRequiresWriterPermission,omitempty"` // DomainUsersOnly: Whether access to this shared drive and items inside @@ -1224,18 +1218,17 @@ func (s *DriveList) MarshalJSON() ([]byte, error) { // File: The metadata for a file. type File struct { - // AppProperties: A collection of arbitrary key-value pairs which are + // AppProperties: A collection of arbitrary key-value pairs that are // private to the requesting app. // Entries with null values are cleared in update and copy requests. // These properties can only be retrieved using an authenticated // request. An authenticated request uses an access token obtained with - // a OAuth 2 client ID. You cannot use an API key to retrieve private + // an OAuth 2 client ID. You cannot use an API key to retrieve private // properties. AppProperties map[string]string `json:"appProperties,omitempty"` - // Capabilities: Output only. Capabilities the current user has on this - // file. Each capability corresponds to a fine-grained action that a - // user may take. + // Capabilities: Capabilities the current user has on this file. Each + // capability corresponds to a fine-grained action that a user can take. Capabilities *FileCapabilities `json:"capabilities,omitempty"` // ContentHints: Additional information about the content of the file. @@ -1257,258 +1250,256 @@ type File struct { // Description: A short description of the file. Description string `json:"description,omitempty"` - // DriveId: Output only. ID of the shared drive the file resides in. - // Only populated for items in shared drives. + // DriveId: ID of the shared drive the file resides in. Only populated + // for items in shared drives. DriveId string `json:"driveId,omitempty"` - // ExplicitlyTrashed: Output only. Whether the file has been explicitly - // trashed, as opposed to recursively trashed from a parent folder. + // ExplicitlyTrashed: Whether the file has been explicitly trashed, as + // opposed to recursively trashed from a parent folder. ExplicitlyTrashed bool `json:"explicitlyTrashed,omitempty"` - // ExportLinks: Output only. Links for exporting Docs Editors files to - // specific formats. + // ExportLinks: Links for exporting Docs Editors files to specific + // formats. ExportLinks map[string]string `json:"exportLinks,omitempty"` - // FileExtension: Output only. The final component of - // `fullFileExtension`. This is only available for files with binary - // content in Google Drive. + // FileExtension: The final component of fullFileExtension. This is only + // available for files with binary content in Google Drive. FileExtension string `json:"fileExtension,omitempty"` - // FolderColorRgb: The color for a folder or a shortcut to a folder as - // an RGB hex string. The supported colors are published in the - // `folderColorPalette` field of the About resource. If an unsupported - // color is specified, the closest color in the palette is used instead. + // FolderColorRgb: The color for a folder or shortcut to a folder as an + // RGB hex string. The supported colors are published in the + // folderColorPalette field of the About resource. + // If an unsupported color is specified, the closest color in the + // palette will be used instead. FolderColorRgb string `json:"folderColorRgb,omitempty"` - // FullFileExtension: Output only. The full file extension extracted - // from the `name` field. May contain multiple concatenated extensions, - // such as "tar.gz". This is only available for files with binary - // content in Google Drive. This is automatically updated when the - // `name` field changes, however it is not cleared if the new name does - // not contain a valid extension. + // FullFileExtension: The full file extension extracted from the name + // field. Can contain multiple concatenated extensions, such as + // "tar.gz". This is only available for files with binary content in + // Google Drive. + // This is automatically updated when the name field changes, however + // it's not cleared if the new name does not contain a valid extension. FullFileExtension string `json:"fullFileExtension,omitempty"` - // HasAugmentedPermissions: Output only. Whether there are permissions - // directly on this file. This field is only populated for items in - // shared drives. + // HasAugmentedPermissions: Whether there are permissions directly on + // this file. This field is only populated for items in shared drives. HasAugmentedPermissions bool `json:"hasAugmentedPermissions,omitempty"` - // HasThumbnail: Output only. Whether this file has a thumbnail. This - // does not indicate whether the requesting app has access to the - // thumbnail. To check access, look for the presence of the - // thumbnailLink field. + // HasThumbnail: Whether this file has a thumbnail. This does not + // indicate whether the requesting app has access to the thumbnail. To + // check access, look for the presence of the thumbnailLink field. HasThumbnail bool `json:"hasThumbnail,omitempty"` - // HeadRevisionId: Output only. The ID of the file's head revision. This - // is currently only available for files with binary content in Google - // Drive. + // HeadRevisionId: The ID of the file's head revision. This is only + // available for files with binary content in Google Drive. HeadRevisionId string `json:"headRevisionId,omitempty"` - // IconLink: Output only. A static, unauthenticated link to the file's - // icon. + // IconLink: A static, unauthenticated link to the file's icon. IconLink string `json:"iconLink,omitempty"` // Id: The ID of the file. Id string `json:"id,omitempty"` - // ImageMediaMetadata: Output only. Additional metadata about image - // media, if available. + // ImageMediaMetadata: Additional metadata about image media, if + // available. ImageMediaMetadata *FileImageMediaMetadata `json:"imageMediaMetadata,omitempty"` - // IsAppAuthorized: Output only. Whether the file was created or opened - // by the requesting app. + // IsAppAuthorized: Whether the requesting app created or opened the + // file. IsAppAuthorized bool `json:"isAppAuthorized,omitempty"` - // Kind: Output only. Identifies what kind of resource this is. Value: - // the fixed string "drive#file". + // Kind: Identifies what kind of resource this is. Value: the fixed + // string "drive#file". Kind string `json:"kind,omitempty"` - // LabelInfo: Output only. An overview of the labels on the file. + // LabelInfo: An overview of the labels on the file. LabelInfo *FileLabelInfo `json:"labelInfo,omitempty"` - // LastModifyingUser: Output only. The last user to modify the file. + // LastModifyingUser: The last user to modify the file. LastModifyingUser *User `json:"lastModifyingUser,omitempty"` // LinkShareMetadata: Contains details about the link URLs that clients // are using to refer to this item. LinkShareMetadata *FileLinkShareMetadata `json:"linkShareMetadata,omitempty"` - // Md5Checksum: Output only. The MD5 checksum for the content of the - // file. This is only applicable to files with binary content in Google - // Drive. + // Md5Checksum: The MD5 checksum for the content of the file. This is + // only applicable to files with binary content in Google Drive. Md5Checksum string `json:"md5Checksum,omitempty"` - // MimeType: The MIME type of the file. Google Drive attempts to - // automatically detect an appropriate value from uploaded content, if - // no value is provided. The value cannot be changed unless a new - // revision is uploaded. If a file is created with a Google Doc MIME - // type, the uploaded content is imported, if possible. The supported - // import formats are published in the About resource. + // MimeType: The MIME type of the file. + // Google Drive will attempt to automatically detect an appropriate + // value from uploaded content if no value is provided. The value cannot + // be changed unless a new revision is uploaded. + // If a file is created with a Google Doc MIME type, the uploaded + // content will be imported if possible. The supported import formats + // are published in the About resource. MimeType string `json:"mimeType,omitempty"` - // ModifiedByMe: Output only. Whether the file has been modified by this - // user. + // ModifiedByMe: Whether this user has modified the file. ModifiedByMe bool `json:"modifiedByMe,omitempty"` - // ModifiedByMeTime: The last time the file was modified by the user - // (RFC 3339 date-time). + // ModifiedByMeTime: The last time the user modified the file (RFC 3339 + // date-time). ModifiedByMeTime string `json:"modifiedByMeTime,omitempty"` - // ModifiedTime: he last time the file was modified by anyone (RFC 3339 - // date-time). Note that setting modifiedTime will also update - // modifiedByMeTime for the user. + // ModifiedTime: The last time anyone modified the file (RFC 3339 + // date-time). + // Note that setting modifiedTime will also update modifiedByMeTime for + // the user. ModifiedTime string `json:"modifiedTime,omitempty"` - // Name: The name of the file. This is not necessarily unique within a - // folder. Note that for immutable items such as the top level folders + // Name: The name of the file. This isn't necessarily unique within a + // folder. Note that for immutable items such as the top-level folders // of shared drives, My Drive root folder, and Application Data folder // the name is constant. Name string `json:"name,omitempty"` // OriginalFilename: The original filename of the uploaded content if - // available, or else the original value of the `name` field. This is - // only available for files with binary content in Google Drive. + // available, or else the original value of the name field. This is only + // available for files with binary content in Google Drive. OriginalFilename string `json:"originalFilename,omitempty"` - // OwnedByMe: Output only. Whether the user owns the file. Not populated - // for items in shared drives. + // OwnedByMe: Whether the user owns the file. Not populated for items in + // shared drives. OwnedByMe bool `json:"ownedByMe,omitempty"` - // Owners: Output only. The owner of this file. Only certain legacy - // files may have more than one owner. This field isn't populated for - // items in shared drives. + // Owners: The owner of this file. Only certain legacy files might have + // more than one owner. This field isn't populated for items in shared + // drives. Owners []*User `json:"owners,omitempty"` - // Parents: The IDs of the parent folders which contain the file. If not - // specified as part of a create request, the file is placed directly in - // the user's My Drive folder. If not specified as part of a copy - // request, the file inherits any discoverable parents of the source - // file. Update requests must use the `addParents` and `removeParents` - // parameters to modify the parents list. + // Parents: The IDs of the parent folders that contain the file. + // If not specified as part of a create request, the file will be placed + // directly in the user's My Drive folder. If not specified as part of a + // copy request, the file will inherit any discoverable parents of the + // source file. Update requests must use the addParents and + // removeParents parameters to modify the parents list. Parents []string `json:"parents,omitempty"` - // PermissionIds: Output only. List of permission IDs for users with - // access to this file. + // PermissionIds: List of permission IDs for users with access to this + // file. PermissionIds []string `json:"permissionIds,omitempty"` - // Permissions: Output only. The full list of permissions for the file. - // This is only available if the requesting user can share the file. Not - // populated for items in shared drives. + // Permissions: The full list of permissions for the file. This is only + // available if the requesting user can share the file. Not populated + // for items in shared drives. Permissions []*Permission `json:"permissions,omitempty"` - // Properties: A collection of arbitrary key-value pairs which are + // Properties: A collection of arbitrary key-value pairs that are // visible to all apps. // Entries with null values are cleared in update and copy requests. Properties map[string]string `json:"properties,omitempty"` - // QuotaBytesUsed: Output only. The number of storage quota bytes used - // by the file. This includes the head revision as well as previous - // revisions with `keepForever` enabled. + // QuotaBytesUsed: The number of storage quota bytes used by the file. + // This includes the head revision as well as previous revisions with + // keepForever enabled. QuotaBytesUsed int64 `json:"quotaBytesUsed,omitempty,string"` - // ResourceKey: Output only. A key needed to access the item via a - // shared link. + // ResourceKey: A key needed to access the item via a shared link. ResourceKey string `json:"resourceKey,omitempty"` - // Sha1Checksum: Output only. The SHA1 checksum associated with this - // file, if available. This field is only populated for files with - // content stored in Google Drive; it is not populated for Docs Editors - // or shortcut files. + // Sha1Checksum: The SHA1 checksum associated with this file, if + // available. This field is only populated for files with content stored + // in Google Drive; it's not populated for Docs Editors or shortcut + // files. Sha1Checksum string `json:"sha1Checksum,omitempty"` - // Sha256Checksum: Output only. The SHA256 checksum associated with this - // file, if available. This field is only populated for files with - // content stored in Google Drive; it is not populated for Docs Editors - // or shortcut files. + // Sha256Checksum: The SHA256 checksum associated with this file, if + // available. This field is only populated for files with content stored + // in Google Drive; it's not populated for Docs Editors or shortcut + // files. Sha256Checksum string `json:"sha256Checksum,omitempty"` - // Shared: Output only. Whether the file has been shared. Not populated - // for items in shared drives. + // Shared: Whether the file has been shared. Not populated for items in + // shared drives. Shared bool `json:"shared,omitempty"` // SharedWithMeTime: The time at which the file was shared with the // user, if applicable (RFC 3339 date-time). SharedWithMeTime string `json:"sharedWithMeTime,omitempty"` - // SharingUser: Output only. The user who shared the file with the - // requesting user, if applicable. + // SharingUser: The user who shared the file with the requesting user, + // if applicable. SharingUser *User `json:"sharingUser,omitempty"` // ShortcutDetails: Shortcut file details. Only populated for shortcut // files, which have the mimeType field set to - // `application/vnd.google-apps.shortcut`. + // application/vnd.google-apps.shortcut. ShortcutDetails *FileShortcutDetails `json:"shortcutDetails,omitempty"` - // Size: Output only. Size in bytes of blobs and first party editor - // files. Won't be populated for files that have no size, like shortcuts - // and folders. + // Size: The size of the file's content in bytes. This field is + // populated for files with binary content stored in Google Drive and + // for Docs Editors files; it's not populated for shortcuts or folders. Size int64 `json:"size,omitempty,string"` - // Spaces: Output only. The list of spaces which contain the file. The - // currently supported values are 'drive', 'appDataFolder' and 'photos'. + // Spaces: The list of spaces that contain the file. The currently + // supported values are 'drive', 'appDataFolder' and 'photos'. Spaces []string `json:"spaces,omitempty"` // Starred: Whether the user has starred the file. Starred bool `json:"starred,omitempty"` - // TeamDriveId: Deprecated: Output only. Use `driveId` instead. + // TeamDriveId: Deprecated - use driveId instead. TeamDriveId string `json:"teamDriveId,omitempty"` - // ThumbnailLink: Output only. A short-lived link to the file's - // thumbnail, if available. Typically lasts on the order of hours. Only - // populated when the requesting app can access the file's content. + // ThumbnailLink: A short-lived link to the file's thumbnail, if + // available. Typically lasts on the order of hours. Only populated when + // the requesting app can access the file's content. If the file isn't + // shared publicly, the URL returned in Files.thumbnailLink must be + // fetched using a credentialed request. ThumbnailLink string `json:"thumbnailLink,omitempty"` - // ThumbnailVersion: Output only. The thumbnail version for use in - // thumbnail cache invalidation. + // ThumbnailVersion: The thumbnail version for use in thumbnail cache + // invalidation. ThumbnailVersion int64 `json:"thumbnailVersion,omitempty,string"` // Trashed: Whether the file has been trashed, either explicitly or from - // a trashed parent folder. Only the owner may trash a file, and other - // users cannot see files in the owner's trash. + // a trashed parent folder. Only the owner can trash a file. The trashed + // item is excluded from all files.list responses returned for any user + // who does not own the file. However, all users with access to the file + // can see the trashed item metadata in an API response. All users with + // access can copy, download, export, and share the file. Trashed bool `json:"trashed,omitempty"` // TrashedTime: The time that the item was trashed (RFC 3339 date-time). // Only populated for items in shared drives. TrashedTime string `json:"trashedTime,omitempty"` - // TrashingUser: Output only. If the file has been explicitly trashed, - // the user who trashed it. Only populated for items in shared drives. + // TrashingUser: If the file has been explicitly trashed, the user who + // trashed it. Only populated for items in shared drives. TrashingUser *User `json:"trashingUser,omitempty"` - // Version: Output only. A monotonically increasing version number for - // the file. This reflects every change made to the file on the server, - // even those not visible to the user. + // Version: A monotonically increasing version number for the file. This + // reflects every change made to the file on the server, even those not + // visible to the user. Version int64 `json:"version,omitempty,string"` - // VideoMediaMetadata: Output only. Additional metadata about video - // media. This may not be available immediately upon upload. + // VideoMediaMetadata: Additional metadata about video media. This might + // not be available immediately upon upload. VideoMediaMetadata *FileVideoMediaMetadata `json:"videoMediaMetadata,omitempty"` - // ViewedByMe: Output only. Whether the file has been viewed by this - // user. + // ViewedByMe: Whether this user has viewed the file. ViewedByMe bool `json:"viewedByMe,omitempty"` - // ViewedByMeTime: The last time the file was viewed by the user (RFC - // 3339 date-time). + // ViewedByMeTime: The last time the user viewed the file (RFC 3339 + // date-time). ViewedByMeTime string `json:"viewedByMeTime,omitempty"` - // ViewersCanCopyContent: Deprecated: Use `copyRequiresWriterPermission` + // ViewersCanCopyContent: Deprecated - use copyRequiresWriterPermission // instead. ViewersCanCopyContent bool `json:"viewersCanCopyContent,omitempty"` - // WebContentLink: Output only. A link for downloading the content of - // the file in a browser. This is only available for files with binary - // content in Google Drive. + // WebContentLink: A link for downloading the content of the file in a + // browser. This is only available for files with binary content in + // Google Drive. WebContentLink string `json:"webContentLink,omitempty"` - // WebViewLink: Output only. A link for opening the file in a relevant - // Google editor or viewer in a browser. + // WebViewLink: A link for opening the file in a relevant Google editor + // or viewer in a browser. WebViewLink string `json:"webViewLink,omitempty"` - // WritersCanShare: Whether users with only `writer` permission can - // modify the file's permissions. Not populated for items in shared - // drives. + // WritersCanShare: Whether users with only writer permission can modify + // the file's permissions. Not populated for items in shared drives. WritersCanShare bool `json:"writersCanShare,omitempty"` // ServerResponse contains the HTTP response code and headers from the @@ -1538,186 +1529,174 @@ func (s *File) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// FileCapabilities: Output only. Capabilities the current user has on -// this file. Each capability corresponds to a fine-grained action that -// a user may take. +// FileCapabilities: Capabilities the current user has on this file. +// Each capability corresponds to a fine-grained action that a user can +// take. type FileCapabilities struct { - // CanAcceptOwnership: Output only. Whether the current user is the - // pending owner of the file. Not populated for shared drive files. + // CanAcceptOwnership: Whether the current user is the pending owner of + // the file. Not populated for shared drive files. CanAcceptOwnership bool `json:"canAcceptOwnership,omitempty"` - // CanAddChildren: Output only. Whether the current user can add - // children to this folder. This is always false when the item is not a - // folder. + // CanAddChildren: Whether the current user can add children to this + // folder. This is always false when the item isn't a folder. CanAddChildren bool `json:"canAddChildren,omitempty"` - // CanAddFolderFromAnotherDrive: Output only. Whether the current user - // can add a folder from another drive (different shared drive or My - // Drive) to this folder. This is false when the item is not a folder. - // Only populated for items in shared drives. + // CanAddFolderFromAnotherDrive: Whether the current user can add a + // folder from another drive (different shared drive or My Drive) to + // this folder. This is false when the item isn't a folder. Only + // populated for items in shared drives. CanAddFolderFromAnotherDrive bool `json:"canAddFolderFromAnotherDrive,omitempty"` - // CanAddMyDriveParent: Output only. Whether the current user can add a - // parent for the item without removing an existing parent in the same - // request. Not populated for shared drive files. + // CanAddMyDriveParent: Whether the current user can add a parent for + // the item without removing an existing parent in the same request. Not + // populated for shared drive files. CanAddMyDriveParent bool `json:"canAddMyDriveParent,omitempty"` - // CanChangeCopyRequiresWriterPermission: Output only. Whether the - // current user can change the `copyRequiresWriterPermission` - // restriction of this file. + // CanChangeCopyRequiresWriterPermission: Whether the current user can + // change the copyRequiresWriterPermission restriction of this file. CanChangeCopyRequiresWriterPermission bool `json:"canChangeCopyRequiresWriterPermission,omitempty"` - // CanChangeSecurityUpdateEnabled: Output only. Whether the current user - // can change the securityUpdateEnabled field on link share metadata. + // CanChangeSecurityUpdateEnabled: Whether the current user can change + // the securityUpdateEnabled field on link share metadata. CanChangeSecurityUpdateEnabled bool `json:"canChangeSecurityUpdateEnabled,omitempty"` - // CanChangeViewersCanCopyContent: Deprecated: Output only. + // CanChangeViewersCanCopyContent: Deprecated CanChangeViewersCanCopyContent bool `json:"canChangeViewersCanCopyContent,omitempty"` - // CanComment: Output only. Whether the current user can comment on this - // file. + // CanComment: Whether the current user can comment on this file. CanComment bool `json:"canComment,omitempty"` - // CanCopy: Output only. Whether the current user can copy this file. - // For an item in a shared drive, whether the current user can copy - // non-folder descendants of this item, or this item itself if it is not - // a folder. + // CanCopy: Whether the current user can copy this file. For an item in + // a shared drive, whether the current user can copy non-folder + // descendants of this item, or this item itself if it's not a folder. CanCopy bool `json:"canCopy,omitempty"` - // CanDelete: Output only. Whether the current user can delete this - // file. + // CanDelete: Whether the current user can delete this file. CanDelete bool `json:"canDelete,omitempty"` - // CanDeleteChildren: Output only. Whether the current user can delete - // children of this folder. This is false when the item is not a folder. - // Only populated for items in shared drives. + // CanDeleteChildren: Whether the current user can delete children of + // this folder. This is false when the item isn't a folder. Only + // populated for items in shared drives. CanDeleteChildren bool `json:"canDeleteChildren,omitempty"` - // CanDownload: Output only. Whether the current user can download this - // file. + // CanDownload: Whether the current user can download this file. CanDownload bool `json:"canDownload,omitempty"` - // CanEdit: Output only. Whether the current user can edit this file. - // Other factors may limit the type of changes a user can make to a - // file. For example, see `canChangeCopyRequiresWriterPermission` or - // `canModifyContent`. + // CanEdit: Whether the current user can edit this file. Other factors + // might limit the type of changes a user can make to a file. For + // example, see canChangeCopyRequiresWriterPermission or + // canModifyContent. CanEdit bool `json:"canEdit,omitempty"` - // CanListChildren: Output only. Whether the current user can list the - // children of this folder. This is always false when the item is not a - // folder. + // CanListChildren: Whether the current user can list the children of + // this folder. This is always false when the item isn't a folder. CanListChildren bool `json:"canListChildren,omitempty"` - // CanModifyContent: Output only. Whether the current user can modify - // the content of this file. + // CanModifyContent: Whether the current user can modify the content of + // this file. CanModifyContent bool `json:"canModifyContent,omitempty"` - // CanModifyContentRestriction: Output only. Whether the current user - // can modify restrictions on content of this file. + // CanModifyContentRestriction: Whether the current user can modify + // restrictions on content of this file. CanModifyContentRestriction bool `json:"canModifyContentRestriction,omitempty"` - // CanModifyLabels: Output only. Whether the current user can modify the - // labels on the file. + // CanModifyLabels: Whether the current user can modify the labels on + // this file. CanModifyLabels bool `json:"canModifyLabels,omitempty"` - // CanMoveChildrenOutOfDrive: Output only. Whether the current user can - // move children of this folder outside of the shared drive. This is - // false when the item is not a folder. Only populated for items in - // shared drives. + // CanMoveChildrenOutOfDrive: Whether the current user can move children + // of this folder outside of the shared drive. This is false when the + // item isn't a folder. Only populated for items in shared drives. CanMoveChildrenOutOfDrive bool `json:"canMoveChildrenOutOfDrive,omitempty"` - // CanMoveChildrenOutOfTeamDrive: Deprecated: Output only. Use - // `canMoveChildrenOutOfDrive` instead. + // CanMoveChildrenOutOfTeamDrive: Deprecated - use + // canMoveChildrenOutOfDrive instead. CanMoveChildrenOutOfTeamDrive bool `json:"canMoveChildrenOutOfTeamDrive,omitempty"` - // CanMoveChildrenWithinDrive: Output only. Whether the current user can - // move children of this folder within this drive. This is false when - // the item is not a folder. Note that a request to move the child may - // still fail depending on the current user's access to the child and to - // the destination folder. + // CanMoveChildrenWithinDrive: Whether the current user can move + // children of this folder within this shared drive or My Drive. This is + // false when the item isn't a folder. Note that a request to move the + // child might still fail depending on the current user's access to the + // child and to the destination folder. CanMoveChildrenWithinDrive bool `json:"canMoveChildrenWithinDrive,omitempty"` - // CanMoveChildrenWithinTeamDrive: Deprecated: Output only. Use - // `canMoveChildrenWithinDrive` instead. + // CanMoveChildrenWithinTeamDrive: Deprecated - use + // canMoveChildrenWithinDrive instead. CanMoveChildrenWithinTeamDrive bool `json:"canMoveChildrenWithinTeamDrive,omitempty"` - // CanMoveItemIntoTeamDrive: Deprecated: Output only. Use - // `canMoveItemOutOfDrive` instead. + // CanMoveItemIntoTeamDrive: Deprecated - use canMoveItemOutOfDrive + // instead. CanMoveItemIntoTeamDrive bool `json:"canMoveItemIntoTeamDrive,omitempty"` - // CanMoveItemOutOfDrive: Output only. Whether the current user can move - // this item outside of this drive by changing its parent. Note that a - // request to change the parent of the item may still fail depending on - // the new parent that is being added. + // CanMoveItemOutOfDrive: Whether the current user can move this item + // outside of this shared drive or My Drive by changing its parent. Note + // that a request to change the parent of the item might still fail + // depending on the new parent that's being added. CanMoveItemOutOfDrive bool `json:"canMoveItemOutOfDrive,omitempty"` - // CanMoveItemOutOfTeamDrive: Deprecated: Output only. Use - // `canMoveItemOutOfDrive` instead. + // CanMoveItemOutOfTeamDrive: Deprecated - use canMoveItemOutOfDrive + // instead. CanMoveItemOutOfTeamDrive bool `json:"canMoveItemOutOfTeamDrive,omitempty"` - // CanMoveItemWithinDrive: Output only. Whether the current user can - // move this item within this drive. Note that a request to change the - // parent of the item may still fail depending on the new parent that is - // being added and the parent that is being removed. + // CanMoveItemWithinDrive: Whether the current user can move this item + // within this shared drive or My Drive. Note that a request to change + // the parent of the item might still fail depending on the new parent + // that's being added and the parent that's being removed. CanMoveItemWithinDrive bool `json:"canMoveItemWithinDrive,omitempty"` - // CanMoveItemWithinTeamDrive: Deprecated: Output only. Use - // `canMoveItemWithinDrive` instead. + // CanMoveItemWithinTeamDrive: Deprecated - use canMoveItemWithinDrive + // instead. CanMoveItemWithinTeamDrive bool `json:"canMoveItemWithinTeamDrive,omitempty"` - // CanMoveTeamDriveItem: Deprecated: Output only. Use - // `canMoveItemWithinDrive` or `canMoveItemOutOfDrive` instead. + // CanMoveTeamDriveItem: Deprecated - use canMoveItemWithinDrive or + // canMoveItemOutOfDrive instead. CanMoveTeamDriveItem bool `json:"canMoveTeamDriveItem,omitempty"` - // CanReadDrive: Output only. Whether the current user can read the - // shared drive to which this file belongs. Only populated for items in - // shared drives. + // CanReadDrive: Whether the current user can read the shared drive to + // which this file belongs. Only populated for items in shared drives. CanReadDrive bool `json:"canReadDrive,omitempty"` - // CanReadLabels: Output only. Whether the current user can read the - // labels on the file. + // CanReadLabels: Whether the current user can read the labels on this + // file. CanReadLabels bool `json:"canReadLabels,omitempty"` - // CanReadRevisions: Output only. Whether the current user can read the - // revisions resource of this file. For a shared drive item, whether - // revisions of non-folder descendants of this item, or this item itself - // if it is not a folder, can be read. + // CanReadRevisions: Whether the current user can read the revisions + // resource of this file. For a shared drive item, whether revisions of + // non-folder descendants of this item, or this item itself if it's not + // a folder, can be read. CanReadRevisions bool `json:"canReadRevisions,omitempty"` - // CanReadTeamDrive: Deprecated: Output only. Use `canReadDrive` - // instead. + // CanReadTeamDrive: Deprecated - use canReadDrive instead. CanReadTeamDrive bool `json:"canReadTeamDrive,omitempty"` - // CanRemoveChildren: Output only. Whether the current user can remove - // children from this folder. This is always false when the item is not - // a folder. For a folder in a shared drive, use `canDeleteChildren` or - // `canTrashChildren` instead. + // CanRemoveChildren: Whether the current user can remove children from + // this folder. This is always false when the item isn't a folder. For a + // folder in a shared drive, use canDeleteChildren or canTrashChildren + // instead. CanRemoveChildren bool `json:"canRemoveChildren,omitempty"` - // CanRemoveMyDriveParent: Output only. Whether the current user can - // remove a parent from the item without adding another parent in the - // same request. Not populated for shared drive files. + // CanRemoveMyDriveParent: Whether the current user can remove a parent + // from the item without adding another parent in the same request. Not + // populated for shared drive files. CanRemoveMyDriveParent bool `json:"canRemoveMyDriveParent,omitempty"` - // CanRename: Output only. Whether the current user can rename this - // file. + // CanRename: Whether the current user can rename this file. CanRename bool `json:"canRename,omitempty"` - // CanShare: Output only. Whether the current user can modify the - // sharing settings for this file. + // CanShare: Whether the current user can modify the sharing settings + // for this file. CanShare bool `json:"canShare,omitempty"` - // CanTrash: Output only. Whether the current user can move this file to - // trash. + // CanTrash: Whether the current user can move this file to trash. CanTrash bool `json:"canTrash,omitempty"` - // CanTrashChildren: Output only. Whether the current user can trash - // children of this folder. This is false when the item is not a folder. - // Only populated for items in shared drives. + // CanTrashChildren: Whether the current user can trash children of this + // folder. This is false when the item isn't a folder. Only populated + // for items in shared drives. CanTrashChildren bool `json:"canTrashChildren,omitempty"` - // CanUntrash: Output only. Whether the current user can restore this - // file from trash. + // CanUntrash: Whether the current user can restore this file from + // trash. CanUntrash bool `json:"canUntrash,omitempty"` // ForceSendFields is a list of field names (e.g. "CanAcceptOwnership") @@ -1748,8 +1727,8 @@ func (s *FileCapabilities) MarshalJSON() ([]byte, error) { // file. These fields are never populated in responses. type FileContentHints struct { // IndexableText: Text to be indexed for the file to improve fullText - // queries. This is limited to 128KB in length and may contain HTML - // elements. + // queries. This is limited to 128 KB in length and might contain HTML + // elements. For more information, see Manage file metadata. IndexableText string `json:"indexableText,omitempty"` // Thumbnail: A thumbnail for the file. This will only be used if Google @@ -1812,83 +1791,73 @@ func (s *FileContentHintsThumbnail) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// FileImageMediaMetadata: Output only. Additional metadata about image -// media, if available. +// FileImageMediaMetadata: Additional metadata about image media, if +// available. type FileImageMediaMetadata struct { - // Aperture: Output only. The aperture used to create the photo - // (f-number). + // Aperture: The aperture used to create the photo (f-number). Aperture float64 `json:"aperture,omitempty"` - // CameraMake: Output only. The make of the camera used to create the - // photo. + // CameraMake: The make of the camera used to create the photo. CameraMake string `json:"cameraMake,omitempty"` - // CameraModel: Output only. The model of the camera used to create the - // photo. + // CameraModel: The model of the camera used to create the photo. CameraModel string `json:"cameraModel,omitempty"` - // ColorSpace: Output only. The color space of the photo. + // ColorSpace: The color space of the photo. ColorSpace string `json:"colorSpace,omitempty"` - // ExposureBias: Output only. The exposure bias of the photo (APEX - // value). + // ExposureBias: The exposure bias of the photo (APEX value). ExposureBias float64 `json:"exposureBias,omitempty"` - // ExposureMode: Output only. The exposure mode used to create the - // photo. + // ExposureMode: The exposure mode used to create the photo. ExposureMode string `json:"exposureMode,omitempty"` - // ExposureTime: Output only. The length of the exposure, in seconds. + // ExposureTime: The length of the exposure, in seconds. ExposureTime float64 `json:"exposureTime,omitempty"` - // FlashUsed: Output only. Whether a flash was used to create the photo. + // FlashUsed: Whether a flash was used to create the photo. FlashUsed bool `json:"flashUsed,omitempty"` - // FocalLength: Output only. The focal length used to create the photo, - // in millimeters. + // FocalLength: The focal length used to create the photo, in + // millimeters. FocalLength float64 `json:"focalLength,omitempty"` - // Height: Output only. The height of the image in pixels. + // Height: The height of the image in pixels. Height int64 `json:"height,omitempty"` - // IsoSpeed: Output only. The ISO speed used to create the photo. + // IsoSpeed: The ISO speed used to create the photo. IsoSpeed int64 `json:"isoSpeed,omitempty"` - // Lens: Output only. The lens used to create the photo. + // Lens: The lens used to create the photo. Lens string `json:"lens,omitempty"` - // Location: Output only. Geographic location information stored in the - // image. + // Location: Geographic location information stored in the image. Location *FileImageMediaMetadataLocation `json:"location,omitempty"` - // MaxApertureValue: Output only. The smallest f-number of the lens at - // the focal length used to create the photo (APEX value). + // MaxApertureValue: The smallest f-number of the lens at the focal + // length used to create the photo (APEX value). MaxApertureValue float64 `json:"maxApertureValue,omitempty"` - // MeteringMode: Output only. The metering mode used to create the - // photo. + // MeteringMode: The metering mode used to create the photo. MeteringMode string `json:"meteringMode,omitempty"` - // Rotation: Output only. The number of clockwise 90 degree rotations - // applied from the image's original orientation. + // Rotation: The number of clockwise 90-degree rotations applied from + // the image's original orientation. Rotation int64 `json:"rotation,omitempty"` - // Sensor: Output only. The type of sensor used to create the photo. + // Sensor: The type of sensor used to create the photo. Sensor string `json:"sensor,omitempty"` - // SubjectDistance: Output only. The distance to the subject of the - // photo, in meters. + // SubjectDistance: The distance to the subject of the photo, in meters. SubjectDistance int64 `json:"subjectDistance,omitempty"` - // Time: Output only. The date and time the photo was taken (EXIF - // DateTime). + // Time: The date and time the photo was taken (EXIF DateTime). Time string `json:"time,omitempty"` - // WhiteBalance: Output only. The white balance mode used to create the - // photo. + // WhiteBalance: The white balance mode used to create the photo. WhiteBalance string `json:"whiteBalance,omitempty"` - // Width: Output only. The width of the image in pixels. + // Width: The width of the image in pixels. Width int64 `json:"width,omitempty"` // ForceSendFields is a list of field names (e.g. "Aperture") to @@ -1936,16 +1905,16 @@ func (s *FileImageMediaMetadata) UnmarshalJSON(data []byte) error { return nil } -// FileImageMediaMetadataLocation: Output only. Geographic location -// information stored in the image. +// FileImageMediaMetadataLocation: Geographic location information +// stored in the image. type FileImageMediaMetadataLocation struct { - // Altitude: Output only. The altitude stored in the image. + // Altitude: The altitude stored in the image. Altitude float64 `json:"altitude,omitempty"` - // Latitude: Output only. The latitude stored in the image. + // Latitude: The latitude stored in the image. Latitude float64 `json:"latitude,omitempty"` - // Longitude: Output only. The longitude stored in the image. + // Longitude: The longitude stored in the image. Longitude float64 `json:"longitude,omitempty"` // ForceSendFields is a list of field names (e.g. "Altitude") to @@ -1989,11 +1958,10 @@ func (s *FileImageMediaMetadataLocation) UnmarshalJSON(data []byte) error { return nil } -// FileLabelInfo: Output only. An overview of the labels on the file. +// FileLabelInfo: An overview of the labels on the file. type FileLabelInfo struct { - // Labels: Output only. The set of labels on the file as requested by - // the label IDs in the `includeLabels` parameter. By default, no labels - // are returned. + // Labels: The set of labels on the file as requested by the label IDs + // in the includeLabels parameter. By default, no labels are returned. Labels []*Label `json:"labels,omitempty"` // ForceSendFields is a list of field names (e.g. "Labels") to @@ -2022,12 +1990,12 @@ func (s *FileLabelInfo) MarshalJSON() ([]byte, error) { // FileLinkShareMetadata: Contains details about the link URLs that // clients are using to refer to this item. type FileLinkShareMetadata struct { - // SecurityUpdateEligible: Output only. Whether the file is eligible for - // security update. + // SecurityUpdateEligible: Whether the file is eligible for security + // update. SecurityUpdateEligible bool `json:"securityUpdateEligible,omitempty"` - // SecurityUpdateEnabled: Output only. Whether the security update is - // enabled for this file. + // SecurityUpdateEnabled: Whether the security update is enabled for + // this file. SecurityUpdateEnabled bool `json:"securityUpdateEnabled,omitempty"` // ForceSendFields is a list of field names (e.g. @@ -2057,17 +2025,17 @@ func (s *FileLinkShareMetadata) MarshalJSON() ([]byte, error) { // FileShortcutDetails: Shortcut file details. Only populated for // shortcut files, which have the mimeType field set to -// `application/vnd.google-apps.shortcut`. +// application/vnd.google-apps.shortcut. type FileShortcutDetails struct { // TargetId: The ID of the file that this shortcut points to. TargetId string `json:"targetId,omitempty"` - // TargetMimeType: Output only. The MIME type of the file that this - // shortcut points to. The value of this field is a snapshot of the - // target's MIME type, captured when the shortcut is created. + // TargetMimeType: The MIME type of the file that this shortcut points + // to. The value of this field is a snapshot of the target's MIME type, + // captured when the shortcut is created. TargetMimeType string `json:"targetMimeType,omitempty"` - // TargetResourceKey: Output only. The ResourceKey for the target file. + // TargetResourceKey: The ResourceKey for the target file. TargetResourceKey string `json:"targetResourceKey,omitempty"` // ForceSendFields is a list of field names (e.g. "TargetId") to @@ -2093,17 +2061,16 @@ func (s *FileShortcutDetails) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// FileVideoMediaMetadata: Output only. Additional metadata about video -// media. This may not be available immediately upon upload. +// FileVideoMediaMetadata: Additional metadata about video media. This +// might not be available immediately upon upload. type FileVideoMediaMetadata struct { - // DurationMillis: Output only. The duration of the video in - // milliseconds. + // DurationMillis: The duration of the video in milliseconds. DurationMillis int64 `json:"durationMillis,omitempty,string"` - // Height: Output only. The height of the video in pixels. + // Height: The height of the video in pixels. Height int64 `json:"height,omitempty"` - // Width: Output only. The width of the video in pixels. + // Width: The width of the video in pixels. Width int64 `json:"width,omitempty"` // ForceSendFields is a list of field names (e.g. "DurationMillis") to @@ -2223,9 +2190,9 @@ func (s *GeneratedIds) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// Label: Representation of label and label fields. +// Label: Representation of a label and its fields. type Label struct { - // Fields: A map of the fields on the label, keyed by the field's ID. + // Fields: A map of the label's fields keyed by the field ID. Fields map[string]LabelField `json:"fields,omitempty"` // Id: The ID of the label. @@ -2260,33 +2227,37 @@ func (s *Label) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// LabelField: Representation of field, which is a typed key-value pair. +// LabelField: Representation of a label field. type LabelField struct { // DateString: Only present if valueType is dateString. RFC 3339 // formatted date: YYYY-MM-DD. DateString []string `json:"dateString,omitempty"` - // Id: The identifier of this label field. + // Id: The identifier of this field. Id string `json:"id,omitempty"` - // Integer: Only present if `valueType` is `integer`. + // Integer: Only present if valueType is integer. Integer googleapi.Int64s `json:"integer,omitempty"` // Kind: This is always drive#labelField. Kind string `json:"kind,omitempty"` - // Selection: Only present if `valueType` is `selection` + // Selection: Only present if valueType is selection. Selection []string `json:"selection,omitempty"` - // Text: Only present if `valueType` is `text`. + // Text: Only present if valueType is text. Text []string `json:"text,omitempty"` - // User: Only present if `valueType` is `user`. + // User: Only present if valueType is user. User []*User `json:"user,omitempty"` // ValueType: The field type. While new values may be supported in the - // future, the following are currently allowed: * `dateString` * - // `integer` * `selection` * `text` * `user` + // future, the following are currently allowed: + // - dateString + // - integer + // - selection + // - text + // - user ValueType string `json:"valueType,omitempty"` // ForceSendFields is a list of field names (e.g. "DateString") to @@ -2314,29 +2285,26 @@ func (s *LabelField) MarshalJSON() ([]byte, error) { // LabelFieldModification: A modification to a label's field. type LabelFieldModification struct { - // FieldId: The ID of the field to be modified. + // FieldId: The ID of the Field to be modified. FieldId string `json:"fieldId,omitempty"` // Kind: This is always drive#labelFieldModification. Kind string `json:"kind,omitempty"` - // SetDateValues: Replaces the value of a dateString Field with these - // new values. The string must be in the RFC 3339 full-date format: - // YYYY-MM-DD. + // SetDateValues: Replaces a dateString field with these new values. The + // values must be strings in the RFC 3339 full-date format: YYYY-MM-DD. SetDateValues []string `json:"setDateValues,omitempty"` - // SetIntegerValues: Replaces the value of an `integer` field with these - // new values. + // SetIntegerValues: Replaces an integer field with these new values. SetIntegerValues googleapi.Int64s `json:"setIntegerValues,omitempty"` - // SetSelectionValues: Replaces a `selection` field with these new - // values. + // SetSelectionValues: Replaces a selection field with these new values. SetSelectionValues []string `json:"setSelectionValues,omitempty"` - // SetTextValues: Sets the value of a `text` field. + // SetTextValues: Replaces a text field with these new values. SetTextValues []string `json:"setTextValues,omitempty"` - // SetUserValues: Replaces a `user` field with these new values. The + // SetUserValues: Replaces a user field with these new values. The // values must be valid email addresses. SetUserValues []string `json:"setUserValues,omitempty"` @@ -2366,7 +2334,7 @@ func (s *LabelFieldModification) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// LabelList: A list of labels applied to a file. +// LabelList: A list of labels. type LabelList struct { // Kind: This is always drive#labelList Kind string `json:"kind,omitempty"` @@ -2449,9 +2417,9 @@ func (s *LabelModification) MarshalJSON() ([]byte, error) { // ModifyLabelsRequest: A request to modify the set of labels on a file. // This request may contain many modifications that will either all -// succeed or all fail atomically. +// succeed or all fail transactionally. type ModifyLabelsRequest struct { - // Kind: This is always drive#modifyLabelsRequest. + // Kind: This is always drive#modifyLabelsRequest Kind string `json:"kind,omitempty"` // LabelModifications: The list of modifications to apply to the labels @@ -2520,28 +2488,31 @@ func (s *ModifyLabelsResponse) MarshalJSON() ([]byte, error) { } // Permission: A permission for a file. A permission grants a user, -// group, domain or the world access to a file or a folder hierarchy. +// group, domain, or the world access to a file or a folder hierarchy. type Permission struct { // AllowFileDiscovery: Whether the permission allows the file to be // discovered through search. This is only applicable for permissions of - // type `domain` or `anyone`. + // type domain or anyone. AllowFileDiscovery bool `json:"allowFileDiscovery,omitempty"` - // Deleted: Output only. Whether the account associated with this - // permission has been deleted. This field only pertains to user and - // group permissions. + // Deleted: Whether the account associated with this permission has been + // deleted. This field only pertains to user and group permissions. Deleted bool `json:"deleted,omitempty"` - // DisplayName: Output only. The "pretty" name of the value of the - // permission. The following is a list of examples for each type of - // permission: * `user` - User's full name, as defined for their Google - // account, such as "Joe Smith." * `group` - Name of the Google Group, - // such as "The Company Administrators." * `domain` - String domain - // name, such as "thecompany.com." * `anyone` - No `displayName` is - // present. + // DisplayName: The "pretty" name of the value of the permission. The + // following is a list of examples for each type of permission: + // - user - User's full name, as defined for their Google Account, such + // as "Joe Smith." + // - group - Name of the Google Group, such as "The Company + // Administrators." + // - domain - String domain name, such as "your-company.com." + // - anyone - No displayName is present. DisplayName string `json:"displayName,omitempty"` - // Domain: The domain to which this permission refers. + // Domain: The domain to which this permission refers. The following + // options are currently allowed: + // - The entire domain, such as "your-company.com." + // - A target audience, such as "ID.audience.googledomains.com." Domain string `json:"domain,omitempty"` // EmailAddress: The email address of the user or group to which this @@ -2549,53 +2520,62 @@ type Permission struct { EmailAddress string `json:"emailAddress,omitempty"` // ExpirationTime: The time at which this permission will expire (RFC - // 3339 date-time). Expiration times have the following restrictions: - - // They can only be set on user and group permissions - The time must be - // in the future - The time cannot be more than a year in the future + // 3339 date-time). Expiration times have the following restrictions: + // + // - They cannot be set on shared drive items. + // - They can only be set on user and group permissions. + // - The time must be in the future. + // - The time cannot be more than one year in the future. ExpirationTime string `json:"expirationTime,omitempty"` - // Id: Output only. The ID of this permission. This is a unique - // identifier for the grantee, and is published in User resources as - // `permissionId`. IDs should be treated as opaque values. + // Id: The ID of this permission. This is a unique identifier for the + // grantee, and is published in User resources as permissionId. IDs + // should be treated as opaque values. Id string `json:"id,omitempty"` - // Kind: Output only. Identifies what kind of resource this is. Value: - // the fixed string "drive#permission". + // Kind: Identifies what kind of resource this is. Value: the fixed + // string "drive#permission". Kind string `json:"kind,omitempty"` // PendingOwner: Whether the account associated with this permission is - // a pending owner. Only populated for `user` type permissions for files - // that are not in a shared drive. + // a pending owner. Only populated for user type permissions for files + // that aren't in a shared drive. PendingOwner bool `json:"pendingOwner,omitempty"` - // PermissionDetails: Output only. Details of whether the permissions on - // this shared drive item are inherited or directly on this item. This - // is an output-only field which is present only for shared drive items. + // PermissionDetails: Details of whether the permissions on this shared + // drive item are inherited or are directly on this item. This is an + // output-only field that's present only for shared drive items. PermissionDetails []*PermissionPermissionDetails `json:"permissionDetails,omitempty"` - // PhotoLink: Output only. A link to the user's profile photo, if - // available. + // PhotoLink: A link to the user's profile photo, if available. PhotoLink string `json:"photoLink,omitempty"` // Role: The role granted by this permission. While new values may be - // supported in the future, the following are currently allowed: * - // `owner` * `organizer` * `fileOrganizer` * `writer` * `commenter` * - // `reader` + // supported in the future, the following are currently allowed: + // - owner + // - organizer + // - fileOrganizer + // - writer + // - commenter + // - reader Role string `json:"role,omitempty"` - // TeamDrivePermissionDetails: Output only. Deprecated: Output only. Use - // `permissionDetails` instead. + // TeamDrivePermissionDetails: Deprecated - use permissionDetails + // instead. TeamDrivePermissionDetails []*PermissionTeamDrivePermissionDetails `json:"teamDrivePermissionDetails,omitempty"` - // Type: The type of the grantee. Valid values are: * `user` * `group` * - // `domain` * `anyone` When creating a permission, if `type` is `user` - // or `group`, you must provide an `emailAddress` for the user or group. - // When `type` is `domain`, you must provide a `domain`. There isn't - // extra information required for an `anyone` type. + // Type: The type of the grantee. Valid values are: + // - user + // - group + // - domain + // - anyone When creating a permission, if type is user or group, you + // must provide an emailAddress for the user or group. When type is + // domain, you must provide a domain. There isn't extra information + // required for the anyone type. Type string `json:"type,omitempty"` // View: Indicates the view for this permission. Only populated for - // permissions that belong to a view. 'published' is the only supported + // permissions that belong to a view. published is the only supported // value. View string `json:"view,omitempty"` @@ -2628,22 +2608,27 @@ func (s *Permission) MarshalJSON() ([]byte, error) { } type PermissionPermissionDetails struct { - // Inherited: Output only. Whether this permission is inherited. This - // field is always populated. This is an output-only field. + // Inherited: Whether this permission is inherited. This field is always + // populated. This is an output-only field. Inherited bool `json:"inherited,omitempty"` - // InheritedFrom: Output only. The ID of the item from which this - // permission is inherited. This is an output-only field. + // InheritedFrom: The ID of the item from which this permission is + // inherited. This is an output-only field. InheritedFrom string `json:"inheritedFrom,omitempty"` - // PermissionType: Output only. The permission type for this user. While - // new values may be added in future, the following are currently - // possible: * `file` * `member` + // PermissionType: The permission type for this user. While new values + // may be added in future, the following are currently allowed: + // - file + // - member PermissionType string `json:"permissionType,omitempty"` - // Role: Output only. The primary role for this user. While new values - // may be added in the future, the following are currently possible: * - // `organizer` * `fileOrganizer` * `writer` * `commenter` * `reader` + // Role: The primary role for this user. While new values may be added + // in the future, the following are currently allowed: + // - organizer + // - fileOrganizer + // - writer + // - commenter + // - reader Role string `json:"role,omitempty"` // ForceSendFields is a list of field names (e.g. "Inherited") to @@ -2670,19 +2655,18 @@ func (s *PermissionPermissionDetails) MarshalJSON() ([]byte, error) { } type PermissionTeamDrivePermissionDetails struct { - // Inherited: Deprecated: Output only. Use `permissionDetails/inherited` - // instead. + // Inherited: Deprecated - use permissionDetails/inherited instead. Inherited bool `json:"inherited,omitempty"` - // InheritedFrom: Deprecated: Output only. Use - // `permissionDetails/inheritedFrom` instead. + // InheritedFrom: Deprecated - use permissionDetails/inheritedFrom + // instead. InheritedFrom string `json:"inheritedFrom,omitempty"` - // Role: Deprecated: Output only. Use `permissionDetails/role` instead. + // Role: Deprecated - use permissionDetails/role instead. Role string `json:"role,omitempty"` - // TeamDrivePermissionType: Deprecated: Output only. Use - // `permissionDetails/permissionType` instead. + // TeamDrivePermissionType: Deprecated - use + // permissionDetails/permissionType instead. TeamDrivePermissionType string `json:"teamDrivePermissionType,omitempty"` // ForceSendFields is a list of field names (e.g. "Inherited") to @@ -2756,35 +2740,36 @@ func (s *PermissionList) MarshalJSON() ([]byte, error) { // Reply: A reply to a comment on a file. type Reply struct { // Action: The action the reply performed to the parent comment. Valid - // values are: * `resolve` * `reopen` + // values are: + // - resolve + // - reopen Action string `json:"action,omitempty"` - // Author: Output only. The author of the reply. The author's email - // address and permission ID will not be populated. + // Author: The author of the reply. The author's email address and + // permission ID will not be populated. Author *User `json:"author,omitempty"` // Content: The plain text content of the reply. This field is used for - // setting the content, while `htmlContent` should be displayed. This is - // required on creates if no `action` is specified. + // setting the content, while htmlContent should be displayed. This is + // required on creates if no action is specified. Content string `json:"content,omitempty"` // CreatedTime: The time at which the reply was created (RFC 3339 // date-time). CreatedTime string `json:"createdTime,omitempty"` - // Deleted: Output only. Whether the reply has been deleted. A deleted - // reply has no content. + // Deleted: Whether the reply has been deleted. A deleted reply has no + // content. Deleted bool `json:"deleted,omitempty"` - // HtmlContent: Output only. The content of the reply with HTML - // formatting. + // HtmlContent: The content of the reply with HTML formatting. HtmlContent string `json:"htmlContent,omitempty"` - // Id: Output only. The ID of the reply. + // Id: The ID of the reply. Id string `json:"id,omitempty"` - // Kind: Output only. Identifies what kind of resource this is. Value: - // the fixed string "drive#reply". + // Kind: Identifies what kind of resource this is. Value: the fixed + // string "drive#reply". Kind string `json:"kind,omitempty"` // ModifiedTime: The last time the reply was modified (RFC 3339 @@ -2864,42 +2849,40 @@ func (s *ReplyList) MarshalJSON() ([]byte, error) { // Revision: The metadata for a revision to a file. type Revision struct { - // ExportLinks: Output only. Links for exporting Docs Editors files to - // specific formats. + // ExportLinks: Links for exporting Docs Editors files to specific + // formats. ExportLinks map[string]string `json:"exportLinks,omitempty"` - // Id: Output only. The ID of the revision. + // Id: The ID of the revision. Id string `json:"id,omitempty"` // KeepForever: Whether to keep this revision forever, even if it is no // longer the head revision. If not set, the revision will be // automatically purged 30 days after newer content is uploaded. This - // can be set on a maximum of 200 revisions for a file. This field is - // only applicable to files with binary content in Drive. + // can be set on a maximum of 200 revisions for a file. + // This field is only applicable to files with binary content in Drive. KeepForever bool `json:"keepForever,omitempty"` - // Kind: Output only. Identifies what kind of resource this is. Value: - // the fixed string "drive#revision". + // Kind: Identifies what kind of resource this is. Value: the fixed + // string "drive#revision". Kind string `json:"kind,omitempty"` - // LastModifyingUser: Output only. The last user to modify this - // revision. + // LastModifyingUser: The last user to modify this revision. LastModifyingUser *User `json:"lastModifyingUser,omitempty"` - // Md5Checksum: Output only. The MD5 checksum of the revision's content. - // This is only applicable to files with binary content in Drive. + // Md5Checksum: The MD5 checksum of the revision's content. This is only + // applicable to files with binary content in Drive. Md5Checksum string `json:"md5Checksum,omitempty"` - // MimeType: Output only. The MIME type of the revision. + // MimeType: The MIME type of the revision. MimeType string `json:"mimeType,omitempty"` // ModifiedTime: The last time the revision was modified (RFC 3339 // date-time). ModifiedTime string `json:"modifiedTime,omitempty"` - // OriginalFilename: Output only. The original filename used to create - // this revision. This is only applicable to files with binary content - // in Drive. + // OriginalFilename: The original filename used to create this revision. + // This is only applicable to files with binary content in Drive. OriginalFilename string `json:"originalFilename,omitempty"` // PublishAuto: Whether subsequent revisions will be automatically @@ -2910,16 +2893,16 @@ type Revision struct { // applicable to Docs Editors files. Published bool `json:"published,omitempty"` - // PublishedLink: Output only. A link to the published revision. This is - // only populated for Google Sites files. + // PublishedLink: A link to the published revision. This is only + // populated for Google Sites files. PublishedLink string `json:"publishedLink,omitempty"` // PublishedOutsideDomain: Whether this revision is published outside // the domain. This is only applicable to Docs Editors files. PublishedOutsideDomain bool `json:"publishedOutsideDomain,omitempty"` - // Size: Output only. The size of the revision's content in bytes. This - // is only applicable to files with binary content in Drive. + // Size: The size of the revision's content in bytes. This is only + // applicable to files with binary content in Drive. Size int64 `json:"size,omitempty,string"` // ServerResponse contains the HTTP response code and headers from the @@ -3032,9 +3015,9 @@ func (s *StartPageToken) MarshalJSON() ([]byte, error) { type TeamDrive struct { // BackgroundImageFile: An image file and cropping parameters from which // a background image for this Team Drive is set. This is a write only - // field; it can only be set on `drive.teamdrives.update` requests that - // don't set `themeId`. When specified, all fields of the - // `backgroundImageFile` must be set. + // field; it can only be set on drive.teamdrives.update requests that + // don't set themeId. When specified, all fields of the + // backgroundImageFile must be set. BackgroundImageFile *TeamDriveBackgroundImageFile `json:"backgroundImageFile,omitempty"` // BackgroundImageLink: A short-lived link to this Team Drive's @@ -3045,8 +3028,8 @@ type TeamDrive struct { Capabilities *TeamDriveCapabilities `json:"capabilities,omitempty"` // ColorRgb: The color of this Team Drive as an RGB hex string. It can - // only be set on a `drive.teamdrives.update` request that does not set - // `themeId`. + // only be set on a drive.teamdrives.update request that does not set + // themeId. ColorRgb string `json:"colorRgb,omitempty"` // CreatedTime: The time at which the Team Drive was created (RFC 3339 @@ -3065,8 +3048,8 @@ type TeamDrive struct { Name string `json:"name,omitempty"` // OrgUnitId: The organizational unit of this shared drive. This field - // is only populated on `drives.list` responses when the - // `useDomainAdminAccess` parameter is set to `true`. + // is only populated on drives.list responses when the + // useDomainAdminAccess parameter is set to true. OrgUnitId string `json:"orgUnitId,omitempty"` // Restrictions: A set of restrictions that apply to this Team Drive or @@ -3074,12 +3057,12 @@ type TeamDrive struct { Restrictions *TeamDriveRestrictions `json:"restrictions,omitempty"` // ThemeId: The ID of the theme from which the background image and - // color will be set. The set of possible `teamDriveThemes` can be - // retrieved from a `drive.about.get` response. When not specified on a - // `drive.teamdrives.create` request, a random theme is chosen from - // which the background image and color are set. This is a write-only - // field; it can only be set on requests that don't set `colorRgb` or - // `backgroundImageFile`. + // color will be set. The set of possible teamDriveThemes can be + // retrieved from a drive.about.get response. When not specified on a + // drive.teamdrives.create request, a random theme is chosen from which + // the background image and color are set. This is a write-only field; + // it can only be set on requests that don't set colorRgb or + // backgroundImageFile. ThemeId string `json:"themeId,omitempty"` // ServerResponse contains the HTTP response code and headers from the @@ -3112,9 +3095,9 @@ func (s *TeamDrive) MarshalJSON() ([]byte, error) { // TeamDriveBackgroundImageFile: An image file and cropping parameters // from which a background image for this Team Drive is set. This is a -// write only field; it can only be set on `drive.teamdrives.update` -// requests that don't set `themeId`. When specified, all fields of the -// `backgroundImageFile` must be set. +// write only field; it can only be set on drive.teamdrives.update +// requests that don't set themeId. When specified, all fields of the +// backgroundImageFile must be set. type TeamDriveBackgroundImageFile struct { // Id: The ID of an image file in Drive to use for the background image. Id string `json:"id,omitempty"` @@ -3189,17 +3172,17 @@ type TeamDriveCapabilities struct { CanAddChildren bool `json:"canAddChildren,omitempty"` // CanChangeCopyRequiresWriterPermissionRestriction: Whether the current - // user can change the `copyRequiresWriterPermission` restriction of - // this Team Drive. + // user can change the copyRequiresWriterPermission restriction of this + // Team Drive. CanChangeCopyRequiresWriterPermissionRestriction bool `json:"canChangeCopyRequiresWriterPermissionRestriction,omitempty"` // CanChangeDomainUsersOnlyRestriction: Whether the current user can - // change the `domainUsersOnly` restriction of this Team Drive. + // change the domainUsersOnly restriction of this Team Drive. CanChangeDomainUsersOnlyRestriction bool `json:"canChangeDomainUsersOnlyRestriction,omitempty"` // CanChangeSharingFoldersRequiresOrganizerPermissionRestriction: // Whether the current user can change the - // `sharingFoldersRequiresOrganizerPermission` restriction of this Team + // sharingFoldersRequiresOrganizerPermission restriction of this Team // Drive. CanChangeSharingFoldersRequiresOrganizerPermissionRestriction bool `json:"canChangeSharingFoldersRequiresOrganizerPermissionRestriction,omitempty"` @@ -3208,7 +3191,7 @@ type TeamDriveCapabilities struct { CanChangeTeamDriveBackground bool `json:"canChangeTeamDriveBackground,omitempty"` // CanChangeTeamMembersOnlyRestriction: Whether the current user can - // change the `teamMembersOnly` restriction of this Team Drive. + // change the teamMembersOnly restriction of this Team Drive. CanChangeTeamMembersOnlyRestriction bool `json:"canChangeTeamMembersOnlyRestriction,omitempty"` // CanComment: Whether the current user can comment on files in this @@ -3246,8 +3229,8 @@ type TeamDriveCapabilities struct { // resource of files in this Team Drive. CanReadRevisions bool `json:"canReadRevisions,omitempty"` - // CanRemoveChildren: Deprecated: Use `canDeleteChildren` or - // `canTrashChildren` instead. + // CanRemoveChildren: Deprecated - use canDeleteChildren or + // canTrashChildren instead. CanRemoveChildren bool `json:"canRemoveChildren,omitempty"` // CanRename: Whether the current user can rename files or folders in @@ -3303,8 +3286,8 @@ type TeamDriveRestrictions struct { // CopyRequiresWriterPermission: Whether the options to copy, print, or // download files inside this Team Drive, should be disabled for readers - // and commenters. When this restriction is set to `true`, it will - // override the similarly named field to `true` for any file inside this + // and commenters. When this restriction is set to true, it will + // override the similarly named field to true for any file inside this // Team Drive. CopyRequiresWriterPermission bool `json:"copyRequiresWriterPermission,omitempty"` @@ -3394,28 +3377,25 @@ func (s *TeamDriveList) MarshalJSON() ([]byte, error) { // User: Information about a Drive user. type User struct { - // DisplayName: Output only. A plain text displayable name for this - // user. + // DisplayName: A plain text displayable name for this user. DisplayName string `json:"displayName,omitempty"` - // EmailAddress: Output only. The email address of the user. This may - // not be present in certain contexts if the user has not made their - // email address visible to the requester. + // EmailAddress: The email address of the user. This may not be present + // in certain contexts if the user has not made their email address + // visible to the requester. EmailAddress string `json:"emailAddress,omitempty"` - // Kind: Output only. Identifies what kind of resource this is. Value: - // the fixed string "drive#user". + // Kind: Identifies what kind of resource this is. Value: the fixed + // string "drive#user". Kind string `json:"kind,omitempty"` - // Me: Output only. Whether this user is the requesting user. + // Me: Whether this user is the requesting user. Me bool `json:"me,omitempty"` - // PermissionId: Output only. The user's ID as visible in Permission - // resources. + // PermissionId: The user's ID as visible in Permission resources. PermissionId string `json:"permissionId,omitempty"` - // PhotoLink: Output only. A link to the user's profile photo, if - // available. + // PhotoLink: A link to the user's profile photo, if available. PhotoLink string `json:"photoLink,omitempty"` // ForceSendFields is a list of field names (e.g. "DisplayName") to @@ -3506,7 +3486,7 @@ func (c *AboutGetCall) doRequest(alt string) (*http.Response, error) { var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "drive/v3/about") + urls := googleapi.ResolveRelative(c.s.BasePath, "about") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("GET", urls, body) if err != nil { @@ -3555,12 +3535,9 @@ func (c *AboutGetCall) Do(opts ...googleapi.CallOption) (*About, error) { return ret, nil // { // "description": "Gets information about the user, the user's Drive, and system capabilities.", - // "flatPath": "drive/v3/about", // "httpMethod": "GET", // "id": "drive.about.get", - // "parameterOrder": [], - // "parameters": {}, - // "path": "drive/v3/about", + // "path": "about", // "response": { // "$ref": "About" // }, @@ -3596,7 +3573,7 @@ func (r *ChangesService) GetStartPageToken() *ChangesGetStartPageTokenCall { // DriveId sets the optional parameter "driveId": The ID of the shared // drive for which the starting pageToken for listing future changes -// from that shared drive will be returned. +// from that shared drive is returned. func (c *ChangesGetStartPageTokenCall) DriveId(driveId string) *ChangesGetStartPageTokenCall { c.urlParams_.Set("driveId", driveId) return c @@ -3611,14 +3588,14 @@ func (c *ChangesGetStartPageTokenCall) SupportsAllDrives(supportsAllDrives bool) } // SupportsTeamDrives sets the optional parameter "supportsTeamDrives": -// Deprecated: Use `supportsAllDrives` instead. +// Deprecated use supportsAllDrives instead. func (c *ChangesGetStartPageTokenCall) SupportsTeamDrives(supportsTeamDrives bool) *ChangesGetStartPageTokenCall { c.urlParams_.Set("supportsTeamDrives", fmt.Sprint(supportsTeamDrives)) return c } -// TeamDriveId sets the optional parameter "teamDriveId": Deprecated: -// Use `driveId` instead. +// TeamDriveId sets the optional parameter "teamDriveId": Deprecated use +// driveId instead. func (c *ChangesGetStartPageTokenCall) TeamDriveId(teamDriveId string) *ChangesGetStartPageTokenCall { c.urlParams_.Set("teamDriveId", teamDriveId) return c @@ -3672,7 +3649,7 @@ func (c *ChangesGetStartPageTokenCall) doRequest(alt string) (*http.Response, er var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "drive/v3/changes/startPageToken") + urls := googleapi.ResolveRelative(c.s.BasePath, "changes/startPageToken") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("GET", urls, body) if err != nil { @@ -3721,13 +3698,11 @@ func (c *ChangesGetStartPageTokenCall) Do(opts ...googleapi.CallOption) (*StartP return ret, nil // { // "description": "Gets the starting pageToken for listing future changes.", - // "flatPath": "drive/v3/changes/startPageToken", // "httpMethod": "GET", // "id": "drive.changes.getStartPageToken", - // "parameterOrder": [], // "parameters": { // "driveId": { - // "description": "The ID of the shared drive for which the starting pageToken for listing future changes from that shared drive will be returned.", + // "description": "The ID of the shared drive for which the starting pageToken for listing future changes from that shared drive is returned.", // "location": "query", // "type": "string" // }, @@ -3739,17 +3714,17 @@ func (c *ChangesGetStartPageTokenCall) Do(opts ...googleapi.CallOption) (*StartP // }, // "supportsTeamDrives": { // "default": "false", - // "description": "Deprecated: Use `supportsAllDrives` instead.", + // "description": "Deprecated use supportsAllDrives instead.", // "location": "query", // "type": "boolean" // }, // "teamDriveId": { - // "description": "Deprecated: Use `driveId` instead.", + // "description": "Deprecated use driveId instead.", // "location": "query", // "type": "string" // } // }, - // "path": "drive/v3/changes/startPageToken", + // "path": "changes/startPageToken", // "response": { // "$ref": "StartPageToken" // }, @@ -3789,7 +3764,7 @@ func (r *ChangesService) List(pageToken string) *ChangesListCall { } // DriveId sets the optional parameter "driveId": The shared drive from -// which changes will be returned. If specified the change IDs will be +// which changes are returned. If specified the change IDs will be // reflective of the shared drive; use the combined drive ID and change // ID as an identifier. func (c *ChangesListCall) DriveId(driveId string) *ChangesListCall { @@ -3816,7 +3791,7 @@ func (c *ChangesListCall) IncludeItemsFromAllDrives(includeItemsFromAllDrives bo } // IncludeLabels sets the optional parameter "includeLabels": A -// comma-separated list of IDs of labels to include in the `labelInfo` +// comma-separated list of IDs of labels to include in the labelInfo // part of the response. func (c *ChangesListCall) IncludeLabels(includeLabels string) *ChangesListCall { c.urlParams_.Set("includeLabels", includeLabels) @@ -3841,7 +3816,7 @@ func (c *ChangesListCall) IncludeRemoved(includeRemoved bool) *ChangesListCall { } // IncludeTeamDriveItems sets the optional parameter -// "includeTeamDriveItems": Deprecated: Use `includeItemsFromAllDrives` +// "includeTeamDriveItems": Deprecated use includeItemsFromAllDrives // instead. func (c *ChangesListCall) IncludeTeamDriveItems(includeTeamDriveItems bool) *ChangesListCall { c.urlParams_.Set("includeTeamDriveItems", fmt.Sprint(includeTeamDriveItems)) @@ -3882,14 +3857,14 @@ func (c *ChangesListCall) SupportsAllDrives(supportsAllDrives bool) *ChangesList } // SupportsTeamDrives sets the optional parameter "supportsTeamDrives": -// Deprecated: Use `supportsAllDrives` instead. +// Deprecated use supportsAllDrives instead. func (c *ChangesListCall) SupportsTeamDrives(supportsTeamDrives bool) *ChangesListCall { c.urlParams_.Set("supportsTeamDrives", fmt.Sprint(supportsTeamDrives)) return c } -// TeamDriveId sets the optional parameter "teamDriveId": Deprecated: -// Use `driveId` instead. +// TeamDriveId sets the optional parameter "teamDriveId": Deprecated use +// driveId instead. func (c *ChangesListCall) TeamDriveId(teamDriveId string) *ChangesListCall { c.urlParams_.Set("teamDriveId", teamDriveId) return c @@ -3943,7 +3918,7 @@ func (c *ChangesListCall) doRequest(alt string) (*http.Response, error) { var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "drive/v3/changes") + urls := googleapi.ResolveRelative(c.s.BasePath, "changes") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("GET", urls, body) if err != nil { @@ -3992,7 +3967,6 @@ func (c *ChangesListCall) Do(opts ...googleapi.CallOption) (*ChangeList, error) return ret, nil // { // "description": "Lists the changes for a user or shared drive.", - // "flatPath": "drive/v3/changes", // "httpMethod": "GET", // "id": "drive.changes.list", // "parameterOrder": [ @@ -4000,7 +3974,7 @@ func (c *ChangesListCall) Do(opts ...googleapi.CallOption) (*ChangeList, error) // ], // "parameters": { // "driveId": { - // "description": "The shared drive from which changes will be returned. If specified the change IDs will be reflective of the shared drive; use the combined drive ID and change ID as an identifier.", + // "description": "The shared drive from which changes are returned. If specified the change IDs will be reflective of the shared drive; use the combined drive ID and change ID as an identifier.", // "location": "query", // "type": "string" // }, @@ -4017,7 +3991,7 @@ func (c *ChangesListCall) Do(opts ...googleapi.CallOption) (*ChangeList, error) // "type": "boolean" // }, // "includeLabels": { - // "description": "A comma-separated list of IDs of labels to include in the `labelInfo` part of the response.", + // "description": "A comma-separated list of IDs of labels to include in the labelInfo part of the response.", // "location": "query", // "type": "string" // }, @@ -4034,7 +4008,7 @@ func (c *ChangesListCall) Do(opts ...googleapi.CallOption) (*ChangeList, error) // }, // "includeTeamDriveItems": { // "default": "false", - // "description": "Deprecated: Use `includeItemsFromAllDrives` instead.", + // "description": "Deprecated use includeItemsFromAllDrives instead.", // "location": "query", // "type": "boolean" // }, @@ -4073,17 +4047,17 @@ func (c *ChangesListCall) Do(opts ...googleapi.CallOption) (*ChangeList, error) // }, // "supportsTeamDrives": { // "default": "false", - // "description": "Deprecated: Use `supportsAllDrives` instead.", + // "description": "Deprecated use supportsAllDrives instead.", // "location": "query", // "type": "boolean" // }, // "teamDriveId": { - // "description": "Deprecated: Use `driveId` instead.", + // "description": "Deprecated use driveId instead.", // "location": "query", // "type": "string" // } // }, - // "path": "drive/v3/changes", + // "path": "changes", // "response": { // "$ref": "ChangeList" // }, @@ -4111,7 +4085,8 @@ type ChangesWatchCall struct { header_ http.Header } -// Watch: Subscribes to changes for a user. +// Watch: Subscribes to changes for a user. To use this method, you must +// include the pageToken query parameter. // // - pageToken: The token for continuing a previous list request on the // next page. This should be set to the value of 'nextPageToken' from @@ -4125,7 +4100,7 @@ func (r *ChangesService) Watch(pageToken string, channel *Channel) *ChangesWatch } // DriveId sets the optional parameter "driveId": The shared drive from -// which changes will be returned. If specified the change IDs will be +// which changes are returned. If specified the change IDs will be // reflective of the shared drive; use the combined drive ID and change // ID as an identifier. func (c *ChangesWatchCall) DriveId(driveId string) *ChangesWatchCall { @@ -4152,7 +4127,7 @@ func (c *ChangesWatchCall) IncludeItemsFromAllDrives(includeItemsFromAllDrives b } // IncludeLabels sets the optional parameter "includeLabels": A -// comma-separated list of IDs of labels to include in the `labelInfo` +// comma-separated list of IDs of labels to include in the labelInfo // part of the response. func (c *ChangesWatchCall) IncludeLabels(includeLabels string) *ChangesWatchCall { c.urlParams_.Set("includeLabels", includeLabels) @@ -4177,7 +4152,7 @@ func (c *ChangesWatchCall) IncludeRemoved(includeRemoved bool) *ChangesWatchCall } // IncludeTeamDriveItems sets the optional parameter -// "includeTeamDriveItems": Deprecated: Use `includeItemsFromAllDrives` +// "includeTeamDriveItems": Deprecated use includeItemsFromAllDrives // instead. func (c *ChangesWatchCall) IncludeTeamDriveItems(includeTeamDriveItems bool) *ChangesWatchCall { c.urlParams_.Set("includeTeamDriveItems", fmt.Sprint(includeTeamDriveItems)) @@ -4218,14 +4193,14 @@ func (c *ChangesWatchCall) SupportsAllDrives(supportsAllDrives bool) *ChangesWat } // SupportsTeamDrives sets the optional parameter "supportsTeamDrives": -// Deprecated: Use `supportsAllDrives` instead. +// Deprecated use supportsAllDrives instead. func (c *ChangesWatchCall) SupportsTeamDrives(supportsTeamDrives bool) *ChangesWatchCall { c.urlParams_.Set("supportsTeamDrives", fmt.Sprint(supportsTeamDrives)) return c } -// TeamDriveId sets the optional parameter "teamDriveId": Deprecated: -// Use `driveId` instead. +// TeamDriveId sets the optional parameter "teamDriveId": Deprecated use +// driveId instead. func (c *ChangesWatchCall) TeamDriveId(teamDriveId string) *ChangesWatchCall { c.urlParams_.Set("teamDriveId", teamDriveId) return c @@ -4271,7 +4246,7 @@ func (c *ChangesWatchCall) doRequest(alt string) (*http.Response, error) { reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "drive/v3/changes/watch") + urls := googleapi.ResolveRelative(c.s.BasePath, "changes/watch") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("POST", urls, body) if err != nil { @@ -4319,8 +4294,7 @@ func (c *ChangesWatchCall) Do(opts ...googleapi.CallOption) (*Channel, error) { } return ret, nil // { - // "description": "Subscribes to changes for a user.", - // "flatPath": "drive/v3/changes/watch", + // "description": "Subscribes to changes for a user. To use this method, you must include the pageToken query parameter.", // "httpMethod": "POST", // "id": "drive.changes.watch", // "parameterOrder": [ @@ -4328,7 +4302,7 @@ func (c *ChangesWatchCall) Do(opts ...googleapi.CallOption) (*Channel, error) { // ], // "parameters": { // "driveId": { - // "description": "The shared drive from which changes will be returned. If specified the change IDs will be reflective of the shared drive; use the combined drive ID and change ID as an identifier.", + // "description": "The shared drive from which changes are returned. If specified the change IDs will be reflective of the shared drive; use the combined drive ID and change ID as an identifier.", // "location": "query", // "type": "string" // }, @@ -4345,7 +4319,7 @@ func (c *ChangesWatchCall) Do(opts ...googleapi.CallOption) (*Channel, error) { // "type": "boolean" // }, // "includeLabels": { - // "description": "A comma-separated list of IDs of labels to include in the `labelInfo` part of the response.", + // "description": "A comma-separated list of IDs of labels to include in the labelInfo part of the response.", // "location": "query", // "type": "string" // }, @@ -4362,7 +4336,7 @@ func (c *ChangesWatchCall) Do(opts ...googleapi.CallOption) (*Channel, error) { // }, // "includeTeamDriveItems": { // "default": "false", - // "description": "Deprecated: Use `includeItemsFromAllDrives` instead.", + // "description": "Deprecated use includeItemsFromAllDrives instead.", // "location": "query", // "type": "boolean" // }, @@ -4401,17 +4375,17 @@ func (c *ChangesWatchCall) Do(opts ...googleapi.CallOption) (*Channel, error) { // }, // "supportsTeamDrives": { // "default": "false", - // "description": "Deprecated: Use `supportsAllDrives` instead.", + // "description": "Deprecated use supportsAllDrives instead.", // "location": "query", // "type": "boolean" // }, // "teamDriveId": { - // "description": "Deprecated: Use `driveId` instead.", + // "description": "Deprecated use driveId instead.", // "location": "query", // "type": "string" // } // }, - // "path": "drive/v3/changes/watch", + // "path": "changes/watch", // "request": { // "$ref": "Channel", // "parameterName": "resource" @@ -4443,7 +4417,7 @@ type ChannelsStopCall struct { header_ http.Header } -// Stop: Stop watching resources through this channel. +// Stop: Stop watching resources through this channel func (r *ChannelsService) Stop(channel *Channel) *ChannelsStopCall { c := &ChannelsStopCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.channel = channel @@ -4490,7 +4464,7 @@ func (c *ChannelsStopCall) doRequest(alt string) (*http.Response, error) { reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "drive/v3/channels/stop") + urls := googleapi.ResolveRelative(c.s.BasePath, "channels/stop") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("POST", urls, body) if err != nil { @@ -4513,13 +4487,10 @@ func (c *ChannelsStopCall) Do(opts ...googleapi.CallOption) error { } return nil // { - // "description": "Stop watching resources through this channel.", - // "flatPath": "drive/v3/channels/stop", + // "description": "Stop watching resources through this channel", // "httpMethod": "POST", // "id": "drive.channels.stop", - // "parameterOrder": [], - // "parameters": {}, - // "path": "drive/v3/channels/stop", + // "path": "channels/stop", // "request": { // "$ref": "Channel", // "parameterName": "resource" @@ -4598,7 +4569,7 @@ func (c *CommentsCreateCall) doRequest(alt string) (*http.Response, error) { reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "drive/v3/files/{fileId}/comments") + urls := googleapi.ResolveRelative(c.s.BasePath, "files/{fileId}/comments") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("POST", urls, body) if err != nil { @@ -4650,7 +4621,6 @@ func (c *CommentsCreateCall) Do(opts ...googleapi.CallOption) (*Comment, error) return ret, nil // { // "description": "Creates a comment on a file.", - // "flatPath": "drive/v3/files/{fileId}/comments", // "httpMethod": "POST", // "id": "drive.comments.create", // "parameterOrder": [ @@ -4664,7 +4634,7 @@ func (c *CommentsCreateCall) Do(opts ...googleapi.CallOption) (*Comment, error) // "type": "string" // } // }, - // "path": "drive/v3/files/{fileId}/comments", + // "path": "files/{fileId}/comments", // "request": { // "$ref": "Comment" // }, @@ -4736,7 +4706,7 @@ func (c *CommentsDeleteCall) doRequest(alt string) (*http.Response, error) { var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "drive/v3/files/{fileId}/comments/{commentId}") + urls := googleapi.ResolveRelative(c.s.BasePath, "files/{fileId}/comments/{commentId}") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("DELETE", urls, body) if err != nil { @@ -4764,7 +4734,6 @@ func (c *CommentsDeleteCall) Do(opts ...googleapi.CallOption) error { return nil // { // "description": "Deletes a comment.", - // "flatPath": "drive/v3/files/{fileId}/comments/{commentId}", // "httpMethod": "DELETE", // "id": "drive.comments.delete", // "parameterOrder": [ @@ -4785,7 +4754,7 @@ func (c *CommentsDeleteCall) Do(opts ...googleapi.CallOption) error { // "type": "string" // } // }, - // "path": "drive/v3/files/{fileId}/comments/{commentId}", + // "path": "files/{fileId}/comments/{commentId}", // "scopes": [ // "https://www.googleapis.com/auth/drive", // "https://www.googleapis.com/auth/drive.file" @@ -4873,7 +4842,7 @@ func (c *CommentsGetCall) doRequest(alt string) (*http.Response, error) { var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "drive/v3/files/{fileId}/comments/{commentId}") + urls := googleapi.ResolveRelative(c.s.BasePath, "files/{fileId}/comments/{commentId}") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("GET", urls, body) if err != nil { @@ -4926,7 +4895,6 @@ func (c *CommentsGetCall) Do(opts ...googleapi.CallOption) (*Comment, error) { return ret, nil // { // "description": "Gets a comment by ID.", - // "flatPath": "drive/v3/files/{fileId}/comments/{commentId}", // "httpMethod": "GET", // "id": "drive.comments.get", // "parameterOrder": [ @@ -4953,7 +4921,7 @@ func (c *CommentsGetCall) Do(opts ...googleapi.CallOption) (*Comment, error) { // "type": "boolean" // } // }, - // "path": "drive/v3/files/{fileId}/comments/{commentId}", + // "path": "files/{fileId}/comments/{commentId}", // "response": { // "$ref": "Comment" // }, @@ -5065,7 +5033,7 @@ func (c *CommentsListCall) doRequest(alt string) (*http.Response, error) { var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "drive/v3/files/{fileId}/comments") + urls := googleapi.ResolveRelative(c.s.BasePath, "files/{fileId}/comments") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("GET", urls, body) if err != nil { @@ -5117,7 +5085,6 @@ func (c *CommentsListCall) Do(opts ...googleapi.CallOption) (*CommentList, error return ret, nil // { // "description": "Lists a file's comments.", - // "flatPath": "drive/v3/files/{fileId}/comments", // "httpMethod": "GET", // "id": "drive.comments.list", // "parameterOrder": [ @@ -5156,7 +5123,7 @@ func (c *CommentsListCall) Do(opts ...googleapi.CallOption) (*CommentList, error // "type": "string" // } // }, - // "path": "drive/v3/files/{fileId}/comments", + // "path": "files/{fileId}/comments", // "response": { // "$ref": "CommentList" // }, @@ -5254,7 +5221,7 @@ func (c *CommentsUpdateCall) doRequest(alt string) (*http.Response, error) { reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "drive/v3/files/{fileId}/comments/{commentId}") + urls := googleapi.ResolveRelative(c.s.BasePath, "files/{fileId}/comments/{commentId}") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("PATCH", urls, body) if err != nil { @@ -5307,7 +5274,6 @@ func (c *CommentsUpdateCall) Do(opts ...googleapi.CallOption) (*Comment, error) return ret, nil // { // "description": "Updates a comment with patch semantics.", - // "flatPath": "drive/v3/files/{fileId}/comments/{commentId}", // "httpMethod": "PATCH", // "id": "drive.comments.update", // "parameterOrder": [ @@ -5328,7 +5294,7 @@ func (c *CommentsUpdateCall) Do(opts ...googleapi.CallOption) (*Comment, error) // "type": "string" // } // }, - // "path": "drive/v3/files/{fileId}/comments/{commentId}", + // "path": "files/{fileId}/comments/{commentId}", // "request": { // "$ref": "Comment" // }, @@ -5408,7 +5374,7 @@ func (c *DrivesCreateCall) doRequest(alt string) (*http.Response, error) { reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "drive/v3/drives") + urls := googleapi.ResolveRelative(c.s.BasePath, "drives") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("POST", urls, body) if err != nil { @@ -5457,7 +5423,6 @@ func (c *DrivesCreateCall) Do(opts ...googleapi.CallOption) (*Drive, error) { return ret, nil // { // "description": "Creates a shared drive.", - // "flatPath": "drive/v3/drives", // "httpMethod": "POST", // "id": "drive.drives.create", // "parameterOrder": [ @@ -5471,7 +5436,7 @@ func (c *DrivesCreateCall) Do(opts ...googleapi.CallOption) (*Drive, error) { // "type": "string" // } // }, - // "path": "drive/v3/drives", + // "path": "drives", // "request": { // "$ref": "Drive" // }, @@ -5507,8 +5472,8 @@ func (r *DrivesService) Delete(driveId string) *DrivesDeleteCall { // AllowItemDeletion sets the optional parameter "allowItemDeletion": // Whether any items inside the shared drive should also be deleted. -// This option is only supported when `useDomainAdminAccess` is also set -// to `true`. +// This option is only supported when useDomainAdminAccess is also set +// to true. func (c *DrivesDeleteCall) AllowItemDeletion(allowItemDeletion bool) *DrivesDeleteCall { c.urlParams_.Set("allowItemDeletion", fmt.Sprint(allowItemDeletion)) return c @@ -5558,7 +5523,7 @@ func (c *DrivesDeleteCall) doRequest(alt string) (*http.Response, error) { var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "drive/v3/drives/{driveId}") + urls := googleapi.ResolveRelative(c.s.BasePath, "drives/{driveId}") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("DELETE", urls, body) if err != nil { @@ -5585,7 +5550,6 @@ func (c *DrivesDeleteCall) Do(opts ...googleapi.CallOption) error { return nil // { // "description": "Permanently deletes a shared drive for which the user is an organizer. The shared drive cannot contain any untrashed items.", - // "flatPath": "drive/v3/drives/{driveId}", // "httpMethod": "DELETE", // "id": "drive.drives.delete", // "parameterOrder": [ @@ -5594,7 +5558,7 @@ func (c *DrivesDeleteCall) Do(opts ...googleapi.CallOption) error { // "parameters": { // "allowItemDeletion": { // "default": "false", - // "description": "Whether any items inside the shared drive should also be deleted. This option is only supported when `useDomainAdminAccess` is also set to `true`.", + // "description": "Whether any items inside the shared drive should also be deleted. This option is only supported when useDomainAdminAccess is also set to true.", // "location": "query", // "type": "boolean" // }, @@ -5611,7 +5575,7 @@ func (c *DrivesDeleteCall) Do(opts ...googleapi.CallOption) error { // "type": "boolean" // } // }, - // "path": "drive/v3/drives/{driveId}", + // "path": "drives/{driveId}", // "scopes": [ // "https://www.googleapis.com/auth/drive" // ] @@ -5696,7 +5660,7 @@ func (c *DrivesGetCall) doRequest(alt string) (*http.Response, error) { var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "drive/v3/drives/{driveId}") + urls := googleapi.ResolveRelative(c.s.BasePath, "drives/{driveId}") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("GET", urls, body) if err != nil { @@ -5748,7 +5712,6 @@ func (c *DrivesGetCall) Do(opts ...googleapi.CallOption) (*Drive, error) { return ret, nil // { // "description": "Gets a shared drive's metadata by ID.", - // "flatPath": "drive/v3/drives/{driveId}", // "httpMethod": "GET", // "id": "drive.drives.get", // "parameterOrder": [ @@ -5768,7 +5731,7 @@ func (c *DrivesGetCall) Do(opts ...googleapi.CallOption) (*Drive, error) { // "type": "boolean" // } // }, - // "path": "drive/v3/drives/{driveId}", + // "path": "drives/{driveId}", // "response": { // "$ref": "Drive" // }, @@ -5834,7 +5797,7 @@ func (c *DrivesHideCall) doRequest(alt string) (*http.Response, error) { var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "drive/v3/drives/{driveId}/hide") + urls := googleapi.ResolveRelative(c.s.BasePath, "drives/{driveId}/hide") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("POST", urls, body) if err != nil { @@ -5886,7 +5849,6 @@ func (c *DrivesHideCall) Do(opts ...googleapi.CallOption) (*Drive, error) { return ret, nil // { // "description": "Hides a shared drive from the default view.", - // "flatPath": "drive/v3/drives/{driveId}/hide", // "httpMethod": "POST", // "id": "drive.drives.hide", // "parameterOrder": [ @@ -5900,7 +5862,7 @@ func (c *DrivesHideCall) Do(opts ...googleapi.CallOption) (*Drive, error) { // "type": "string" // } // }, - // "path": "drive/v3/drives/{driveId}/hide", + // "path": "drives/{driveId}/hide", // "response": { // "$ref": "Drive" // }, @@ -5921,10 +5883,7 @@ type DrivesListCall struct { header_ http.Header } -// List: Lists the user's shared drives. This method accepts the `q` -// parameter, which is a search query combining one or more search -// terms. For more information, see the Search for shared drives -// (/drive/api/guides/search-shareddrives) guide. +// List: Lists the user's shared drives. func (r *DrivesService) List() *DrivesListCall { c := &DrivesListCall{s: r.s, urlParams_: make(gensupport.URLParams)} return c @@ -6008,7 +5967,7 @@ func (c *DrivesListCall) doRequest(alt string) (*http.Response, error) { var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "drive/v3/drives") + urls := googleapi.ResolveRelative(c.s.BasePath, "drives") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("GET", urls, body) if err != nil { @@ -6056,11 +6015,9 @@ func (c *DrivesListCall) Do(opts ...googleapi.CallOption) (*DriveList, error) { } return ret, nil // { - // "description": " Lists the user's shared drives. This method accepts the `q` parameter, which is a search query combining one or more search terms. For more information, see the [Search for shared drives](/drive/api/guides/search-shareddrives) guide.", - // "flatPath": "drive/v3/drives", + // "description": "Lists the user's shared drives.", // "httpMethod": "GET", // "id": "drive.drives.list", - // "parameterOrder": [], // "parameters": { // "pageSize": { // "default": "10", @@ -6088,7 +6045,7 @@ func (c *DrivesListCall) Do(opts ...googleapi.CallOption) (*DriveList, error) { // "type": "boolean" // } // }, - // "path": "drive/v3/drives", + // "path": "drives", // "response": { // "$ref": "DriveList" // }, @@ -6175,7 +6132,7 @@ func (c *DrivesUnhideCall) doRequest(alt string) (*http.Response, error) { var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "drive/v3/drives/{driveId}/unhide") + urls := googleapi.ResolveRelative(c.s.BasePath, "drives/{driveId}/unhide") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("POST", urls, body) if err != nil { @@ -6227,7 +6184,6 @@ func (c *DrivesUnhideCall) Do(opts ...googleapi.CallOption) (*Drive, error) { return ret, nil // { // "description": "Restores a shared drive to the default view.", - // "flatPath": "drive/v3/drives/{driveId}/unhide", // "httpMethod": "POST", // "id": "drive.drives.unhide", // "parameterOrder": [ @@ -6241,7 +6197,7 @@ func (c *DrivesUnhideCall) Do(opts ...googleapi.CallOption) (*Drive, error) { // "type": "string" // } // }, - // "path": "drive/v3/drives/{driveId}/unhide", + // "path": "drives/{driveId}/unhide", // "response": { // "$ref": "Drive" // }, @@ -6263,7 +6219,7 @@ type DrivesUpdateCall struct { header_ http.Header } -// Update: Updates the metadate for a shared drive. +// Update: Updates the metadata for a shared drive. // // - driveId: The ID of the shared drive. func (r *DrivesService) Update(driveId string, drive *Drive) *DrivesUpdateCall { @@ -6274,9 +6230,9 @@ func (r *DrivesService) Update(driveId string, drive *Drive) *DrivesUpdateCall { } // UseDomainAdminAccess sets the optional parameter -// "useDomainAdminAccess": Issue the request as a domain administrator; -// if set to true, then the requester will be granted access if they are -// an administrator of the domain to which the shared drive belongs. +// "useDomainAdminAccess": Issue the request as a domain administrator. +// If set to true, then the requester is granted access if they're an +// administrator of the domain to which the shared drive belongs. func (c *DrivesUpdateCall) UseDomainAdminAccess(useDomainAdminAccess bool) *DrivesUpdateCall { c.urlParams_.Set("useDomainAdminAccess", fmt.Sprint(useDomainAdminAccess)) return c @@ -6322,7 +6278,7 @@ func (c *DrivesUpdateCall) doRequest(alt string) (*http.Response, error) { reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "drive/v3/drives/{driveId}") + urls := googleapi.ResolveRelative(c.s.BasePath, "drives/{driveId}") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("PATCH", urls, body) if err != nil { @@ -6373,8 +6329,7 @@ func (c *DrivesUpdateCall) Do(opts ...googleapi.CallOption) (*Drive, error) { } return ret, nil // { - // "description": "Updates the metadate for a shared drive.", - // "flatPath": "drive/v3/drives/{driveId}", + // "description": "Updates the metadata for a shared drive.", // "httpMethod": "PATCH", // "id": "drive.drives.update", // "parameterOrder": [ @@ -6389,12 +6344,12 @@ func (c *DrivesUpdateCall) Do(opts ...googleapi.CallOption) (*Drive, error) { // }, // "useDomainAdminAccess": { // "default": "false", - // "description": "Issue the request as a domain administrator; if set to true, then the requester will be granted access if they are an administrator of the domain to which the shared drive belongs.", + // "description": "Issue the request as a domain administrator. If set to true, then the requester is granted access if they're an administrator of the domain to which the shared drive belongs.", // "location": "query", // "type": "boolean" // } // }, - // "path": "drive/v3/drives/{driveId}", + // "path": "drives/{driveId}", // "request": { // "$ref": "Drive" // }, @@ -6420,7 +6375,7 @@ type FilesCopyCall struct { } // Copy: Creates a copy of a file and applies any requested updates with -// patch semantics. +// patch semantics. Folders cannot be copied. // // - fileId: The ID of the file. func (r *FilesService) Copy(fileId string, file *File) *FilesCopyCall { @@ -6450,7 +6405,7 @@ func (c *FilesCopyCall) IgnoreDefaultVisibility(ignoreDefaultVisibility bool) *F } // IncludeLabels sets the optional parameter "includeLabels": A -// comma-separated list of IDs of labels to include in the `labelInfo` +// comma-separated list of IDs of labels to include in the labelInfo // part of the response. func (c *FilesCopyCall) IncludeLabels(includeLabels string) *FilesCopyCall { c.urlParams_.Set("includeLabels", includeLabels) @@ -6492,7 +6447,7 @@ func (c *FilesCopyCall) SupportsAllDrives(supportsAllDrives bool) *FilesCopyCall } // SupportsTeamDrives sets the optional parameter "supportsTeamDrives": -// Deprecated: Use `supportsAllDrives` instead. +// Deprecated use supportsAllDrives instead. func (c *FilesCopyCall) SupportsTeamDrives(supportsTeamDrives bool) *FilesCopyCall { c.urlParams_.Set("supportsTeamDrives", fmt.Sprint(supportsTeamDrives)) return c @@ -6538,7 +6493,7 @@ func (c *FilesCopyCall) doRequest(alt string) (*http.Response, error) { reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "drive/v3/files/{fileId}/copy") + urls := googleapi.ResolveRelative(c.s.BasePath, "files/{fileId}/copy") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("POST", urls, body) if err != nil { @@ -6589,8 +6544,7 @@ func (c *FilesCopyCall) Do(opts ...googleapi.CallOption) (*File, error) { } return ret, nil // { - // "description": "Creates a copy of a file and applies any requested updates with patch semantics.", - // "flatPath": "drive/v3/files/{fileId}/copy", + // "description": "Creates a copy of a file and applies any requested updates with patch semantics. Folders cannot be copied.", // "httpMethod": "POST", // "id": "drive.files.copy", // "parameterOrder": [ @@ -6616,7 +6570,7 @@ func (c *FilesCopyCall) Do(opts ...googleapi.CallOption) (*File, error) { // "type": "boolean" // }, // "includeLabels": { - // "description": "A comma-separated list of IDs of labels to include in the `labelInfo` part of the response.", + // "description": "A comma-separated list of IDs of labels to include in the labelInfo part of the response.", // "location": "query", // "type": "string" // }, @@ -6644,12 +6598,12 @@ func (c *FilesCopyCall) Do(opts ...googleapi.CallOption) (*File, error) { // }, // "supportsTeamDrives": { // "default": "false", - // "description": "Deprecated: Use `supportsAllDrives` instead.", + // "description": "Deprecated use supportsAllDrives instead.", // "location": "query", // "type": "boolean" // } // }, - // "path": "drive/v3/files/{fileId}/copy", + // "path": "files/{fileId}/copy", // "request": { // "$ref": "File" // }, @@ -6677,25 +6631,7 @@ type FilesCreateCall struct { header_ http.Header } -// Create: Creates a new file. This method supports an */upload* URI -// and accepts uploaded media with the following characteristics: - -// *Maximum file size:* 5120GB - *Accepted Media MIME types:*`*/*` Note: -// Specify a valid MIME type, rather than the literal `*/*` value. The -// literal `*/*` is only used to indicate that any valid MIME type can -// be uploaded. For further information on uploading files, refer to -// Upload files (/drive/api/guides/manage-uploads). Apps creating -// shortcuts with `files.create` must specify the MIME type -// `application/vnd.google-apps.shortcut`. Apps should specify a file -// extension in the `name` property when inserting files with the API. -// For example, an operation to insert a JPEG file should specify -// something like "name": "cat.jpg" in the metadata. Subsequent `GET` -// requests include the read-only `fileExtension` property populated -// with the extension originally specified in the `title` property. When -// a Google Drive user requests to download a file, or when the file is -// downloaded through the sync client, Drive builds a full filename -// (with extension) based on the title. In cases where the extension is -// missing, Google Drive attempts to determine the extension based on -// the file's MIME type. +// Create: Creates a file. func (r *FilesService) Create(file *File) *FilesCreateCall { c := &FilesCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.file = file @@ -6722,7 +6658,7 @@ func (c *FilesCreateCall) IgnoreDefaultVisibility(ignoreDefaultVisibility bool) } // IncludeLabels sets the optional parameter "includeLabels": A -// comma-separated list of IDs of labels to include in the `labelInfo` +// comma-separated list of IDs of labels to include in the labelInfo // part of the response. func (c *FilesCreateCall) IncludeLabels(includeLabels string) *FilesCreateCall { c.urlParams_.Set("includeLabels", includeLabels) @@ -6764,7 +6700,7 @@ func (c *FilesCreateCall) SupportsAllDrives(supportsAllDrives bool) *FilesCreate } // SupportsTeamDrives sets the optional parameter "supportsTeamDrives": -// Deprecated: Use `supportsAllDrives` instead. +// Deprecated use supportsAllDrives instead. func (c *FilesCreateCall) SupportsTeamDrives(supportsTeamDrives bool) *FilesCreateCall { c.urlParams_.Set("supportsTeamDrives", fmt.Sprint(supportsTeamDrives)) return c @@ -6857,7 +6793,7 @@ func (c *FilesCreateCall) doRequest(alt string) (*http.Response, error) { reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "drive/v3/files") + urls := googleapi.ResolveRelative(c.s.BasePath, "files") if c.mediaInfo_ != nil { urls = googleapi.ResolveRelative(c.s.BasePath, "/upload/drive/v3/files") c.urlParams_.Set("uploadType", c.mediaInfo_.UploadType()) @@ -6933,15 +6869,14 @@ func (c *FilesCreateCall) Do(opts ...googleapi.CallOption) (*File, error) { } return ret, nil // { - // "description": " Creates a new file. This method supports an */upload* URI and accepts uploaded media with the following characteristics: - *Maximum file size:* 5120GB - *Accepted Media MIME types:*`*/*` Note: Specify a valid MIME type, rather than the literal `*/*` value. The literal `*/*` is only used to indicate that any valid MIME type can be uploaded. For further information on uploading files, refer to [Upload files](/drive/api/guides/manage-uploads). Apps creating shortcuts with `files.create` must specify the MIME type `application/vnd.google-apps.shortcut`. Apps should specify a file extension in the `name` property when inserting files with the API. For example, an operation to insert a JPEG file should specify something like `\"name\": \"cat.jpg\"` in the metadata. Subsequent `GET` requests include the read-only `fileExtension` property populated with the extension originally specified in the `title` property. When a Google Drive user requests to download a file, or when the file is downloaded through the sync client, Drive builds a full filename (with extension) based on the title. In cases where the extension is missing, Google Drive attempts to determine the extension based on the file's MIME type.", - // "flatPath": "drive/v3/files", + // "description": "Creates a file.", // "httpMethod": "POST", // "id": "drive.files.create", // "mediaUpload": { // "accept": [ // "*/*" // ], - // "maxSize": "5497558138880", + // "maxSize": "5120GB", // "protocols": { // "resumable": { // "multipart": true, @@ -6953,7 +6888,6 @@ func (c *FilesCreateCall) Do(opts ...googleapi.CallOption) (*File, error) { // } // } // }, - // "parameterOrder": [], // "parameters": { // "enforceSingleParent": { // "default": "false", @@ -6968,7 +6902,7 @@ func (c *FilesCreateCall) Do(opts ...googleapi.CallOption) (*File, error) { // "type": "boolean" // }, // "includeLabels": { - // "description": "A comma-separated list of IDs of labels to include in the `labelInfo` part of the response.", + // "description": "A comma-separated list of IDs of labels to include in the labelInfo part of the response.", // "location": "query", // "type": "string" // }, @@ -6996,7 +6930,7 @@ func (c *FilesCreateCall) Do(opts ...googleapi.CallOption) (*File, error) { // }, // "supportsTeamDrives": { // "default": "false", - // "description": "Deprecated: Use `supportsAllDrives` instead.", + // "description": "Deprecated use supportsAllDrives instead.", // "location": "query", // "type": "boolean" // }, @@ -7007,7 +6941,7 @@ func (c *FilesCreateCall) Do(opts ...googleapi.CallOption) (*File, error) { // "type": "boolean" // } // }, - // "path": "drive/v3/files", + // "path": "files", // "request": { // "$ref": "File" // }, @@ -7019,7 +6953,8 @@ func (c *FilesCreateCall) Do(opts ...googleapi.CallOption) (*File, error) { // "https://www.googleapis.com/auth/drive.appdata", // "https://www.googleapis.com/auth/drive.file" // ], - // "supportsMediaUpload": true + // "supportsMediaUpload": true, + // "supportsSubscription": true // } } @@ -7047,7 +6982,7 @@ func (r *FilesService) Delete(fileId string) *FilesDeleteCall { } // EnforceSingleParent sets the optional parameter -// "enforceSingleParent": Deprecated: If an item is not in a shared +// "enforceSingleParent": Deprecated. If an item is not in a shared // drive and its last parent is deleted but the item itself is not, the // item will be placed under its owner's root. func (c *FilesDeleteCall) EnforceSingleParent(enforceSingleParent bool) *FilesDeleteCall { @@ -7064,7 +6999,7 @@ func (c *FilesDeleteCall) SupportsAllDrives(supportsAllDrives bool) *FilesDelete } // SupportsTeamDrives sets the optional parameter "supportsTeamDrives": -// Deprecated: Use `supportsAllDrives` instead. +// Deprecated use supportsAllDrives instead. func (c *FilesDeleteCall) SupportsTeamDrives(supportsTeamDrives bool) *FilesDeleteCall { c.urlParams_.Set("supportsTeamDrives", fmt.Sprint(supportsTeamDrives)) return c @@ -7105,7 +7040,7 @@ func (c *FilesDeleteCall) doRequest(alt string) (*http.Response, error) { var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "drive/v3/files/{fileId}") + urls := googleapi.ResolveRelative(c.s.BasePath, "files/{fileId}") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("DELETE", urls, body) if err != nil { @@ -7132,7 +7067,6 @@ func (c *FilesDeleteCall) Do(opts ...googleapi.CallOption) error { return nil // { // "description": "Permanently deletes a file owned by the user without moving it to the trash. If the file belongs to a shared drive the user must be an organizer on the parent. If the target is a folder, all descendants owned by the user are also deleted.", - // "flatPath": "drive/v3/files/{fileId}", // "httpMethod": "DELETE", // "id": "drive.files.delete", // "parameterOrder": [ @@ -7141,7 +7075,7 @@ func (c *FilesDeleteCall) Do(opts ...googleapi.CallOption) error { // "parameters": { // "enforceSingleParent": { // "default": "false", - // "description": "Deprecated: If an item is not in a shared drive and its last parent is deleted but the item itself is not, the item will be placed under its owner's root.", + // "description": "Deprecated. If an item is not in a shared drive and its last parent is deleted but the item itself is not, the item will be placed under its owner's root.", // "location": "query", // "type": "boolean" // }, @@ -7159,12 +7093,12 @@ func (c *FilesDeleteCall) Do(opts ...googleapi.CallOption) error { // }, // "supportsTeamDrives": { // "default": "false", - // "description": "Deprecated: Use `supportsAllDrives` instead.", + // "description": "Deprecated use supportsAllDrives instead.", // "location": "query", // "type": "boolean" // } // }, - // "path": "drive/v3/files/{fileId}", + // "path": "files/{fileId}", // "scopes": [ // "https://www.googleapis.com/auth/drive", // "https://www.googleapis.com/auth/drive.appdata", @@ -7183,7 +7117,8 @@ type FilesEmptyTrashCall struct { header_ http.Header } -// EmptyTrash: Permanently deletes all of the user's trashed files. +// EmptyTrash: Permanently deletes all trashed files of a user or shared +// drive. func (r *FilesService) EmptyTrash() *FilesEmptyTrashCall { c := &FilesEmptyTrashCall{s: r.s, urlParams_: make(gensupport.URLParams)} return c @@ -7197,7 +7132,7 @@ func (c *FilesEmptyTrashCall) DriveId(driveId string) *FilesEmptyTrashCall { } // EnforceSingleParent sets the optional parameter -// "enforceSingleParent": Deprecated: If an item is not in a shared +// "enforceSingleParent": Deprecated. If an item is not in a shared // drive and its last parent is deleted but the item itself is not, the // item will be placed under its owner's root. func (c *FilesEmptyTrashCall) EnforceSingleParent(enforceSingleParent bool) *FilesEmptyTrashCall { @@ -7240,7 +7175,7 @@ func (c *FilesEmptyTrashCall) doRequest(alt string) (*http.Response, error) { var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "drive/v3/files/trash") + urls := googleapi.ResolveRelative(c.s.BasePath, "files/trash") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("DELETE", urls, body) if err != nil { @@ -7263,11 +7198,9 @@ func (c *FilesEmptyTrashCall) Do(opts ...googleapi.CallOption) error { } return nil // { - // "description": "Permanently deletes all of the user's trashed files.", - // "flatPath": "drive/v3/files/trash", + // "description": "Permanently deletes all trashed files of a user or shared drive.", // "httpMethod": "DELETE", // "id": "drive.files.emptyTrash", - // "parameterOrder": [], // "parameters": { // "driveId": { // "description": "If set, empties the trash of the provided shared drive.", @@ -7276,12 +7209,12 @@ func (c *FilesEmptyTrashCall) Do(opts ...googleapi.CallOption) error { // }, // "enforceSingleParent": { // "default": "false", - // "description": "Deprecated: If an item is not in a shared drive and its last parent is deleted but the item itself is not, the item will be placed under its owner's root.", + // "description": "Deprecated. If an item is not in a shared drive and its last parent is deleted but the item itself is not, the item will be placed under its owner's root.", // "location": "query", // "type": "boolean" // } // }, - // "path": "drive/v3/files/trash", + // "path": "files/trash", // "scopes": [ // "https://www.googleapis.com/auth/drive" // ] @@ -7361,7 +7294,7 @@ func (c *FilesExportCall) doRequest(alt string) (*http.Response, error) { var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "drive/v3/files/{fileId}/export") + urls := googleapi.ResolveRelative(c.s.BasePath, "files/{fileId}/export") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("GET", urls, body) if err != nil { @@ -7404,7 +7337,6 @@ func (c *FilesExportCall) Do(opts ...googleapi.CallOption) error { return nil // { // "description": "Exports a Google Workspace document to the requested MIME type and returns exported byte content. Note that the exported content is limited to 10MB.", - // "flatPath": "drive/v3/files/{fileId}/export", // "httpMethod": "GET", // "id": "drive.files.export", // "parameterOrder": [ @@ -7425,14 +7357,13 @@ func (c *FilesExportCall) Do(opts ...googleapi.CallOption) error { // "type": "string" // } // }, - // "path": "drive/v3/files/{fileId}/export", + // "path": "files/{fileId}/export", // "scopes": [ // "https://www.googleapis.com/auth/drive", // "https://www.googleapis.com/auth/drive.file", // "https://www.googleapis.com/auth/drive.readonly" // ], - // "supportsMediaDownload": true, - // "useMediaDownloadService": true + // "supportsMediaDownload": true // } } @@ -7471,7 +7402,7 @@ func (c *FilesGenerateIdsCall) Space(space string) *FilesGenerateIdsCall { // Type sets the optional parameter "type": The type of items which the // IDs can be used for. Supported values are 'files' and 'shortcuts'. -// Note that 'shortcuts' are only supported in the `drive` 'space'. +// Note that 'shortcuts' are only supported in the drive 'space'. // (Default: 'files') func (c *FilesGenerateIdsCall) Type(type_ string) *FilesGenerateIdsCall { c.urlParams_.Set("type", type_) @@ -7526,7 +7457,7 @@ func (c *FilesGenerateIdsCall) doRequest(alt string) (*http.Response, error) { var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "drive/v3/files/generateIds") + urls := googleapi.ResolveRelative(c.s.BasePath, "files/generateIds") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("GET", urls, body) if err != nil { @@ -7575,10 +7506,8 @@ func (c *FilesGenerateIdsCall) Do(opts ...googleapi.CallOption) (*GeneratedIds, return ret, nil // { // "description": "Generates a set of file IDs which can be provided in create or copy requests.", - // "flatPath": "drive/v3/files/generateIds", // "httpMethod": "GET", // "id": "drive.files.generateIds", - // "parameterOrder": [], // "parameters": { // "count": { // "default": "10", @@ -7597,12 +7526,12 @@ func (c *FilesGenerateIdsCall) Do(opts ...googleapi.CallOption) (*GeneratedIds, // }, // "type": { // "default": "files", - // "description": "The type of items which the IDs can be used for. Supported values are 'files' and 'shortcuts'. Note that 'shortcuts' are only supported in the `drive` 'space'. (Default: 'files')", + // "description": "The type of items which the IDs can be used for. Supported values are 'files' and 'shortcuts'. Note that 'shortcuts' are only supported in the drive 'space'. (Default: 'files')", // "location": "query", // "type": "string" // } // }, - // "path": "drive/v3/files/generateIds", + // "path": "files/generateIds", // "response": { // "$ref": "GeneratedIds" // }, @@ -7626,13 +7555,7 @@ type FilesGetCall struct { header_ http.Header } -// Get: Gets a file's metadata or content by ID. If you provide the URL -// parameter `alt=media`, then the response includes the file contents -// in the response body. Downloading content with `alt=media` only works -// if the file is stored in Drive. To download Google Docs, Sheets, and -// Slides use `files.export` (/drive/api/reference/rest/v3/files/export) -// instead. For further information on downloading files, refer to -// Download files (/drive/api/guides/manage-downloads). +// Get: Gets a file's metadata or content by ID. // // - fileId: The ID of the file. func (r *FilesService) Get(fileId string) *FilesGetCall { @@ -7651,7 +7574,7 @@ func (c *FilesGetCall) AcknowledgeAbuse(acknowledgeAbuse bool) *FilesGetCall { } // IncludeLabels sets the optional parameter "includeLabels": A -// comma-separated list of IDs of labels to include in the `labelInfo` +// comma-separated list of IDs of labels to include in the labelInfo // part of the response. func (c *FilesGetCall) IncludeLabels(includeLabels string) *FilesGetCall { c.urlParams_.Set("includeLabels", includeLabels) @@ -7676,7 +7599,7 @@ func (c *FilesGetCall) SupportsAllDrives(supportsAllDrives bool) *FilesGetCall { } // SupportsTeamDrives sets the optional parameter "supportsTeamDrives": -// Deprecated: Use `supportsAllDrives` instead. +// Deprecated use supportsAllDrives instead. func (c *FilesGetCall) SupportsTeamDrives(supportsTeamDrives bool) *FilesGetCall { c.urlParams_.Set("supportsTeamDrives", fmt.Sprint(supportsTeamDrives)) return c @@ -7730,7 +7653,7 @@ func (c *FilesGetCall) doRequest(alt string) (*http.Response, error) { var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "drive/v3/files/{fileId}") + urls := googleapi.ResolveRelative(c.s.BasePath, "files/{fileId}") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("GET", urls, body) if err != nil { @@ -7797,8 +7720,7 @@ func (c *FilesGetCall) Do(opts ...googleapi.CallOption) (*File, error) { } return ret, nil // { - // "description": " Gets a file's metadata or content by ID. If you provide the URL parameter `alt=media`, then the response includes the file contents in the response body. Downloading content with `alt=media` only works if the file is stored in Drive. To download Google Docs, Sheets, and Slides use [`files.export`](/drive/api/reference/rest/v3/files/export) instead. For further information on downloading files, refer to [Download files](/drive/api/guides/manage-downloads).", - // "flatPath": "drive/v3/files/{fileId}", + // "description": "Gets a file's metadata or content by ID.", // "httpMethod": "GET", // "id": "drive.files.get", // "parameterOrder": [ @@ -7818,7 +7740,7 @@ func (c *FilesGetCall) Do(opts ...googleapi.CallOption) (*File, error) { // "type": "string" // }, // "includeLabels": { - // "description": "A comma-separated list of IDs of labels to include in the `labelInfo` part of the response.", + // "description": "A comma-separated list of IDs of labels to include in the labelInfo part of the response.", // "location": "query", // "type": "string" // }, @@ -7835,12 +7757,12 @@ func (c *FilesGetCall) Do(opts ...googleapi.CallOption) (*File, error) { // }, // "supportsTeamDrives": { // "default": "false", - // "description": "Deprecated: Use `supportsAllDrives` instead.", + // "description": "Deprecated use supportsAllDrives instead.", // "location": "query", // "type": "boolean" // } // }, - // "path": "drive/v3/files/{fileId}", + // "path": "files/{fileId}", // "response": { // "$ref": "File" // }, @@ -7870,34 +7792,35 @@ type FilesListCall struct { header_ http.Header } -// List: Lists the user's files. This method accepts the `q` parameter, -// which is a search query combining one or more search terms. For more -// information, see the Search for files -// (/drive/api/guides/search-files) guide. *Note:* This method returns -// *all* files by default, including trashed files. If you don't want -// trashed files to appear in the list, use the `trashed=false` query -// parameter to filter trashed files from the results. +// List: Lists or searches files. func (r *FilesService) List() *FilesListCall { c := &FilesListCall{s: r.s, urlParams_: make(gensupport.URLParams)} return c } -// Corpora sets the optional parameter "corpora": Bodies of items -// (files/documents) to which the query applies. Supported bodies are -// 'user', 'domain', 'drive' and 'allDrives'. Prefer 'user' or 'drive' -// to 'allDrives' for efficiency. +// Corpora sets the optional parameter "corpora": Groupings of files to +// which the query applies. Supported groupings are: 'user' (files +// created by, opened by, or shared directly with the user), 'drive' +// (files in the specified shared drive as indicated by the 'driveId'), +// 'domain' (files shared to the user's domain), and 'allDrives' (A +// combination of 'user' and 'drive' for all drives where the user is a +// member). When able, use 'user' or 'drive', instead of 'allDrives', +// for efficiency. func (c *FilesListCall) Corpora(corpora string) *FilesListCall { c.urlParams_.Set("corpora", corpora) return c } -// Corpus sets the optional parameter "corpus": Deprecated: The source -// of files to list. Use 'corpora' instead. +// Corpus sets the optional parameter "corpus": The source of files to +// list. Deprecated: use 'corpora' instead. // // Possible values: // // "domain" - Files shared to the user's domain. -// "user" - Files owned by or shared to the user. +// "user" - Files owned by or shared to the user. If a user has +// +// permissions on a Shared Drive, the files inside it won't be retrieved +// unless the user has created, opened, or shared the file. func (c *FilesListCall) Corpus(corpus string) *FilesListCall { c.urlParams_.Set("corpus", corpus) return c @@ -7919,7 +7842,7 @@ func (c *FilesListCall) IncludeItemsFromAllDrives(includeItemsFromAllDrives bool } // IncludeLabels sets the optional parameter "includeLabels": A -// comma-separated list of IDs of labels to include in the `labelInfo` +// comma-separated list of IDs of labels to include in the labelInfo // part of the response. func (c *FilesListCall) IncludeLabels(includeLabels string) *FilesListCall { c.urlParams_.Set("includeLabels", includeLabels) @@ -7936,7 +7859,7 @@ func (c *FilesListCall) IncludePermissionsForView(includePermissionsForView stri } // IncludeTeamDriveItems sets the optional parameter -// "includeTeamDriveItems": Deprecated: Use `includeItemsFromAllDrives` +// "includeTeamDriveItems": Deprecated use includeItemsFromAllDrives // instead. func (c *FilesListCall) IncludeTeamDriveItems(includeTeamDriveItems bool) *FilesListCall { c.urlParams_.Set("includeTeamDriveItems", fmt.Sprint(includeTeamDriveItems)) @@ -7997,14 +7920,14 @@ func (c *FilesListCall) SupportsAllDrives(supportsAllDrives bool) *FilesListCall } // SupportsTeamDrives sets the optional parameter "supportsTeamDrives": -// Deprecated: Use `supportsAllDrives` instead. +// Deprecated use supportsAllDrives instead. func (c *FilesListCall) SupportsTeamDrives(supportsTeamDrives bool) *FilesListCall { c.urlParams_.Set("supportsTeamDrives", fmt.Sprint(supportsTeamDrives)) return c } -// TeamDriveId sets the optional parameter "teamDriveId": Deprecated: -// Use `driveId` instead. +// TeamDriveId sets the optional parameter "teamDriveId": Deprecated use +// driveId instead. func (c *FilesListCall) TeamDriveId(teamDriveId string) *FilesListCall { c.urlParams_.Set("teamDriveId", teamDriveId) return c @@ -8058,7 +7981,7 @@ func (c *FilesListCall) doRequest(alt string) (*http.Response, error) { var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "drive/v3/files") + urls := googleapi.ResolveRelative(c.s.BasePath, "files") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("GET", urls, body) if err != nil { @@ -8106,26 +8029,24 @@ func (c *FilesListCall) Do(opts ...googleapi.CallOption) (*FileList, error) { } return ret, nil // { - // "description": " Lists the user's files. This method accepts the `q` parameter, which is a search query combining one or more search terms. For more information, see the [Search for files](/drive/api/guides/search-files) guide. *Note:* This method returns *all* files by default, including trashed files. If you don't want trashed files to appear in the list, use the `trashed=false` query parameter to filter trashed files from the results.", - // "flatPath": "drive/v3/files", + // "description": "Lists or searches files.", // "httpMethod": "GET", // "id": "drive.files.list", - // "parameterOrder": [], // "parameters": { // "corpora": { - // "description": "Bodies of items (files/documents) to which the query applies. Supported bodies are 'user', 'domain', 'drive' and 'allDrives'. Prefer 'user' or 'drive' to 'allDrives' for efficiency.", + // "description": "Groupings of files to which the query applies. Supported groupings are: 'user' (files created by, opened by, or shared directly with the user), 'drive' (files in the specified shared drive as indicated by the 'driveId'), 'domain' (files shared to the user's domain), and 'allDrives' (A combination of 'user' and 'drive' for all drives where the user is a member). When able, use 'user' or 'drive', instead of 'allDrives', for efficiency.", // "location": "query", // "type": "string" // }, // "corpus": { - // "description": "Deprecated: The source of files to list. Use 'corpora' instead.", + // "description": "The source of files to list. Deprecated: use 'corpora' instead.", // "enum": [ // "domain", // "user" // ], // "enumDescriptions": [ // "Files shared to the user's domain.", - // "Files owned by or shared to the user." + // "Files owned by or shared to the user. If a user has permissions on a Shared Drive, the files inside it won't be retrieved unless the user has created, opened, or shared the file." // ], // "location": "query", // "type": "string" @@ -8142,7 +8063,7 @@ func (c *FilesListCall) Do(opts ...googleapi.CallOption) (*FileList, error) { // "type": "boolean" // }, // "includeLabels": { - // "description": "A comma-separated list of IDs of labels to include in the `labelInfo` part of the response.", + // "description": "A comma-separated list of IDs of labels to include in the labelInfo part of the response.", // "location": "query", // "type": "string" // }, @@ -8153,7 +8074,7 @@ func (c *FilesListCall) Do(opts ...googleapi.CallOption) (*FileList, error) { // }, // "includeTeamDriveItems": { // "default": "false", - // "description": "Deprecated: Use `includeItemsFromAllDrives` instead.", + // "description": "Deprecated use includeItemsFromAllDrives instead.", // "location": "query", // "type": "boolean" // }, @@ -8195,17 +8116,17 @@ func (c *FilesListCall) Do(opts ...googleapi.CallOption) (*FileList, error) { // }, // "supportsTeamDrives": { // "default": "false", - // "description": "Deprecated: Use `supportsAllDrives` instead.", + // "description": "Deprecated use supportsAllDrives instead.", // "location": "query", // "type": "boolean" // }, // "teamDriveId": { - // "description": "Deprecated: Use `driveId` instead.", + // "description": "Deprecated use driveId instead.", // "location": "query", // "type": "string" // } // }, - // "path": "drive/v3/files", + // "path": "files", // "response": { // "$ref": "FileList" // }, @@ -8256,7 +8177,7 @@ type FilesListLabelsCall struct { // ListLabels: Lists the labels on a file. // -// - fileId: The ID for the file or shared drive. +// - fileId: The ID of the file. func (r *FilesService) ListLabels(fileId string) *FilesListLabelsCall { c := &FilesListLabelsCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.fileId = fileId @@ -8264,7 +8185,8 @@ func (r *FilesService) ListLabels(fileId string) *FilesListLabelsCall { } // MaxResults sets the optional parameter "maxResults": The maximum -// number of labels to return per page. When not set, defaults to 100. +// number of labels to return per page. When not set, this defaults to +// 100. func (c *FilesListLabelsCall) MaxResults(maxResults int64) *FilesListLabelsCall { c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) return c @@ -8326,7 +8248,7 @@ func (c *FilesListLabelsCall) doRequest(alt string) (*http.Response, error) { var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "drive/v3/files/{fileId}/listLabels") + urls := googleapi.ResolveRelative(c.s.BasePath, "files/{fileId}/listLabels") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("GET", urls, body) if err != nil { @@ -8378,7 +8300,6 @@ func (c *FilesListLabelsCall) Do(opts ...googleapi.CallOption) (*LabelList, erro return ret, nil // { // "description": "Lists the labels on a file.", - // "flatPath": "drive/v3/files/{fileId}/listLabels", // "httpMethod": "GET", // "id": "drive.files.listLabels", // "parameterOrder": [ @@ -8386,14 +8307,14 @@ func (c *FilesListLabelsCall) Do(opts ...googleapi.CallOption) (*LabelList, erro // ], // "parameters": { // "fileId": { - // "description": "The ID for the file or shared drive.", + // "description": "The ID of the file.", // "location": "path", // "required": true, // "type": "string" // }, // "maxResults": { // "default": "100", - // "description": "The maximum number of labels to return per page. When not set, defaults to 100.", + // "description": "The maximum number of labels to return per page. When not set, this defaults to 100.", // "format": "int32", // "location": "query", // "maximum": "100", @@ -8406,7 +8327,7 @@ func (c *FilesListLabelsCall) Do(opts ...googleapi.CallOption) (*LabelList, erro // "type": "string" // } // }, - // "path": "drive/v3/files/{fileId}/listLabels", + // "path": "files/{fileId}/listLabels", // "response": { // "$ref": "LabelList" // }, @@ -8453,10 +8374,9 @@ type FilesModifyLabelsCall struct { header_ http.Header } -// ModifyLabels: Modifies the set of labels applied to a file. Returns a -// list of the labels that were added or modified. +// ModifyLabels: Modifies the set of labels on a file. // -// - fileId: The ID of the file to which the labels belong. +// - fileId: The ID of the file for which the labels are modified. func (r *FilesService) ModifyLabels(fileId string, modifylabelsrequest *ModifyLabelsRequest) *FilesModifyLabelsCall { c := &FilesModifyLabelsCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.fileId = fileId @@ -8504,7 +8424,7 @@ func (c *FilesModifyLabelsCall) doRequest(alt string) (*http.Response, error) { reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "drive/v3/files/{fileId}/modifyLabels") + urls := googleapi.ResolveRelative(c.s.BasePath, "files/{fileId}/modifyLabels") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("POST", urls, body) if err != nil { @@ -8555,8 +8475,7 @@ func (c *FilesModifyLabelsCall) Do(opts ...googleapi.CallOption) (*ModifyLabelsR } return ret, nil // { - // "description": "Modifies the set of labels applied to a file. Returns a list of the labels that were added or modified.", - // "flatPath": "drive/v3/files/{fileId}/modifyLabels", + // "description": "Modifies the set of labels on a file.", // "httpMethod": "POST", // "id": "drive.files.modifyLabels", // "parameterOrder": [ @@ -8564,13 +8483,13 @@ func (c *FilesModifyLabelsCall) Do(opts ...googleapi.CallOption) (*ModifyLabelsR // ], // "parameters": { // "fileId": { - // "description": "The ID of the file to which the labels belong.", + // "description": "The ID of the file for which the labels are modified.", // "location": "path", // "required": true, // "type": "string" // } // }, - // "path": "drive/v3/files/{fileId}/modifyLabels", + // "path": "files/{fileId}/modifyLabels", // "request": { // "$ref": "ModifyLabelsRequest" // }, @@ -8598,17 +8517,10 @@ type FilesUpdateCall struct { header_ http.Header } -// Update: Updates a file's metadata and/or content. When calling this +// Update: Updates a file's metadata and/or content. When calling this // method, only populate fields in the request that you want to modify. -// When updating fields, some fields might be changed automatically, -// such as `modifiedDate`. This method supports patch semantics. This -// method supports an */upload* URI and accepts uploaded media with the -// following characteristics: - *Maximum file size:* 5120GB - *Accepted -// Media MIME types:*`*/*` Note: Specify a valid MIME type, rather than -// the literal `*/*` value. The literal `*/*` is only used to indicate -// that any valid MIME type can be uploaded. For further information on -// uploading files, refer to Upload files -// (/drive/api/guides/manage-uploads). +// When updating fields, some fields might change automatically, such as +// modifiedDate. This method supports patch semantics. // // - fileId: The ID of the file. func (r *FilesService) Update(fileId string, file *File) *FilesUpdateCall { @@ -8626,7 +8538,7 @@ func (c *FilesUpdateCall) AddParents(addParents string) *FilesUpdateCall { } // EnforceSingleParent sets the optional parameter -// "enforceSingleParent": Deprecated: Adding files to multiple folders +// "enforceSingleParent": Deprecated. Adding files to multiple folders // is no longer supported. Use shortcuts instead. func (c *FilesUpdateCall) EnforceSingleParent(enforceSingleParent bool) *FilesUpdateCall { c.urlParams_.Set("enforceSingleParent", fmt.Sprint(enforceSingleParent)) @@ -8634,7 +8546,7 @@ func (c *FilesUpdateCall) EnforceSingleParent(enforceSingleParent bool) *FilesUp } // IncludeLabels sets the optional parameter "includeLabels": A -// comma-separated list of IDs of labels to include in the `labelInfo` +// comma-separated list of IDs of labels to include in the labelInfo // part of the response. func (c *FilesUpdateCall) IncludeLabels(includeLabels string) *FilesUpdateCall { c.urlParams_.Set("includeLabels", includeLabels) @@ -8683,7 +8595,7 @@ func (c *FilesUpdateCall) SupportsAllDrives(supportsAllDrives bool) *FilesUpdate } // SupportsTeamDrives sets the optional parameter "supportsTeamDrives": -// Deprecated: Use `supportsAllDrives` instead. +// Deprecated use supportsAllDrives instead. func (c *FilesUpdateCall) SupportsTeamDrives(supportsTeamDrives bool) *FilesUpdateCall { c.urlParams_.Set("supportsTeamDrives", fmt.Sprint(supportsTeamDrives)) return c @@ -8776,7 +8688,7 @@ func (c *FilesUpdateCall) doRequest(alt string) (*http.Response, error) { reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "drive/v3/files/{fileId}") + urls := googleapi.ResolveRelative(c.s.BasePath, "files/{fileId}") if c.mediaInfo_ != nil { urls = googleapi.ResolveRelative(c.s.BasePath, "/upload/drive/v3/files/{fileId}") c.urlParams_.Set("uploadType", c.mediaInfo_.UploadType()) @@ -8855,15 +8767,14 @@ func (c *FilesUpdateCall) Do(opts ...googleapi.CallOption) (*File, error) { } return ret, nil // { - // "description": " Updates a file's metadata and/or content. When calling this method, only populate fields in the request that you want to modify. When updating fields, some fields might be changed automatically, such as `modifiedDate`. This method supports patch semantics. This method supports an */upload* URI and accepts uploaded media with the following characteristics: - *Maximum file size:* 5120GB - *Accepted Media MIME types:*`*/*` Note: Specify a valid MIME type, rather than the literal `*/*` value. The literal `*/*` is only used to indicate that any valid MIME type can be uploaded. For further information on uploading files, refer to [Upload files](/drive/api/guides/manage-uploads).", - // "flatPath": "drive/v3/files/{fileId}", + // "description": "Updates a file's metadata and/or content. When calling this method, only populate fields in the request that you want to modify. When updating fields, some fields might change automatically, such as modifiedDate. This method supports patch semantics.", // "httpMethod": "PATCH", // "id": "drive.files.update", // "mediaUpload": { // "accept": [ // "*/*" // ], - // "maxSize": "5497558138880", + // "maxSize": "5120GB", // "protocols": { // "resumable": { // "multipart": true, @@ -8886,7 +8797,7 @@ func (c *FilesUpdateCall) Do(opts ...googleapi.CallOption) (*File, error) { // }, // "enforceSingleParent": { // "default": "false", - // "description": "Deprecated: Adding files to multiple folders is no longer supported. Use shortcuts instead.", + // "description": "Deprecated. Adding files to multiple folders is no longer supported. Use shortcuts instead.", // "location": "query", // "type": "boolean" // }, @@ -8897,7 +8808,7 @@ func (c *FilesUpdateCall) Do(opts ...googleapi.CallOption) (*File, error) { // "type": "string" // }, // "includeLabels": { - // "description": "A comma-separated list of IDs of labels to include in the `labelInfo` part of the response.", + // "description": "A comma-separated list of IDs of labels to include in the labelInfo part of the response.", // "location": "query", // "type": "string" // }, @@ -8930,7 +8841,7 @@ func (c *FilesUpdateCall) Do(opts ...googleapi.CallOption) (*File, error) { // }, // "supportsTeamDrives": { // "default": "false", - // "description": "Deprecated: Use `supportsAllDrives` instead.", + // "description": "Deprecated use supportsAllDrives instead.", // "location": "query", // "type": "boolean" // }, @@ -8941,7 +8852,7 @@ func (c *FilesUpdateCall) Do(opts ...googleapi.CallOption) (*File, error) { // "type": "boolean" // } // }, - // "path": "drive/v3/files/{fileId}", + // "path": "files/{fileId}", // "request": { // "$ref": "File" // }, @@ -8971,7 +8882,7 @@ type FilesWatchCall struct { header_ http.Header } -// Watch: Subscribes to changes to a file. +// Watch: Subscribe to changes on a file. // // - fileId: The ID of the file. func (r *FilesService) Watch(fileId string, channel *Channel) *FilesWatchCall { @@ -8991,7 +8902,7 @@ func (c *FilesWatchCall) AcknowledgeAbuse(acknowledgeAbuse bool) *FilesWatchCall } // IncludeLabels sets the optional parameter "includeLabels": A -// comma-separated list of IDs of labels to include in the `labelInfo` +// comma-separated list of IDs of labels to include in the labelInfo // part of the response. func (c *FilesWatchCall) IncludeLabels(includeLabels string) *FilesWatchCall { c.urlParams_.Set("includeLabels", includeLabels) @@ -9016,7 +8927,7 @@ func (c *FilesWatchCall) SupportsAllDrives(supportsAllDrives bool) *FilesWatchCa } // SupportsTeamDrives sets the optional parameter "supportsTeamDrives": -// Deprecated: Use `supportsAllDrives` instead. +// Deprecated use supportsAllDrives instead. func (c *FilesWatchCall) SupportsTeamDrives(supportsTeamDrives bool) *FilesWatchCall { c.urlParams_.Set("supportsTeamDrives", fmt.Sprint(supportsTeamDrives)) return c @@ -9030,9 +8941,9 @@ func (c *FilesWatchCall) Fields(s ...googleapi.Field) *FilesWatchCall { return c } -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. +// Context sets the context to be used in this call's Do and Download +// methods. Any pending HTTP request will be aborted if the provided +// context is canceled. func (c *FilesWatchCall) Context(ctx context.Context) *FilesWatchCall { c.ctx_ = ctx return c @@ -9062,7 +8973,7 @@ func (c *FilesWatchCall) doRequest(alt string) (*http.Response, error) { reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "drive/v3/files/{fileId}/watch") + urls := googleapi.ResolveRelative(c.s.BasePath, "files/{fileId}/watch") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("POST", urls, body) if err != nil { @@ -9075,6 +8986,22 @@ func (c *FilesWatchCall) doRequest(alt string) (*http.Response, error) { return gensupport.SendRequest(c.ctx_, c.s.client, req) } +// Download fetches the API endpoint's "media" value, instead of the normal +// API response value. If the returned error is nil, the Response is guaranteed to +// have a 2xx status code. Callers must close the Response.Body as usual. +func (c *FilesWatchCall) Download(opts ...googleapi.CallOption) (*http.Response, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("media") + if err != nil { + return nil, err + } + if err := googleapi.CheckResponse(res); err != nil { + res.Body.Close() + return nil, gensupport.WrapError(err) + } + return res, nil +} + // Do executes the "drive.files.watch" call. // Exactly one of *Channel or error will be non-nil. Any non-2xx status // code is an error. Response headers are in either @@ -9113,8 +9040,7 @@ func (c *FilesWatchCall) Do(opts ...googleapi.CallOption) (*Channel, error) { } return ret, nil // { - // "description": "Subscribes to changes to a file.", - // "flatPath": "drive/v3/files/{fileId}/watch", + // "description": "Subscribe to changes on a file.", // "httpMethod": "POST", // "id": "drive.files.watch", // "parameterOrder": [ @@ -9134,7 +9060,7 @@ func (c *FilesWatchCall) Do(opts ...googleapi.CallOption) (*Channel, error) { // "type": "string" // }, // "includeLabels": { - // "description": "A comma-separated list of IDs of labels to include in the `labelInfo` part of the response.", + // "description": "A comma-separated list of IDs of labels to include in the labelInfo part of the response.", // "location": "query", // "type": "string" // }, @@ -9151,12 +9077,12 @@ func (c *FilesWatchCall) Do(opts ...googleapi.CallOption) (*Channel, error) { // }, // "supportsTeamDrives": { // "default": "false", - // "description": "Deprecated: Use `supportsAllDrives` instead.", + // "description": "Deprecated use supportsAllDrives instead.", // "location": "query", // "type": "boolean" // } // }, - // "path": "drive/v3/files/{fileId}/watch", + // "path": "files/{fileId}/watch", // "request": { // "$ref": "Channel", // "parameterName": "resource" @@ -9173,7 +9099,9 @@ func (c *FilesWatchCall) Do(opts ...googleapi.CallOption) (*Channel, error) { // "https://www.googleapis.com/auth/drive.photos.readonly", // "https://www.googleapis.com/auth/drive.readonly" // ], - // "supportsSubscription": true + // "supportsMediaDownload": true, + // "supportsSubscription": true, + // "useMediaDownloadService": true // } } @@ -9189,9 +9117,9 @@ type PermissionsCreateCall struct { header_ http.Header } -// Create: Creates a permission for a file or shared drive. **Warning:** -// Concurrent permissions operations on the same file are not supported; -// only the last update is applied. +// Create: Creates a permission for a file or shared drive. For more +// information on creating permissions, see Share files, folders & +// drives. // // - fileId: The ID of the file or shared drive. func (r *PermissionsService) Create(fileId string, permission *Permission) *PermissionsCreateCall { @@ -9209,7 +9137,7 @@ func (c *PermissionsCreateCall) EmailMessage(emailMessage string) *PermissionsCr } // EnforceSingleParent sets the optional parameter -// "enforceSingleParent": Deprecated: See `moveToNewOwnersRoot` for +// "enforceSingleParent": Deprecated. See moveToNewOwnersRoot for // details. func (c *PermissionsCreateCall) EnforceSingleParent(enforceSingleParent bool) *PermissionsCreateCall { c.urlParams_.Set("enforceSingleParent", fmt.Sprint(enforceSingleParent)) @@ -9219,9 +9147,9 @@ func (c *PermissionsCreateCall) EnforceSingleParent(enforceSingleParent bool) *P // MoveToNewOwnersRoot sets the optional parameter // "moveToNewOwnersRoot": This parameter will only take effect if the // item is not in a shared drive and the request is attempting to -// transfer the ownership of the item. If set to `true`, the item will -// be moved to the new owner's My Drive root folder and all prior -// parents removed. If set to `false`, parents are not changed. +// transfer the ownership of the item. If set to true, the item will be +// moved to the new owner's My Drive root folder and all prior parents +// removed. If set to false, parents are not changed. func (c *PermissionsCreateCall) MoveToNewOwnersRoot(moveToNewOwnersRoot bool) *PermissionsCreateCall { c.urlParams_.Set("moveToNewOwnersRoot", fmt.Sprint(moveToNewOwnersRoot)) return c @@ -9246,7 +9174,7 @@ func (c *PermissionsCreateCall) SupportsAllDrives(supportsAllDrives bool) *Permi } // SupportsTeamDrives sets the optional parameter "supportsTeamDrives": -// Deprecated: Use `supportsAllDrives` instead. +// Deprecated use supportsAllDrives instead. func (c *PermissionsCreateCall) SupportsTeamDrives(supportsTeamDrives bool) *PermissionsCreateCall { c.urlParams_.Set("supportsTeamDrives", fmt.Sprint(supportsTeamDrives)) return c @@ -9255,7 +9183,12 @@ func (c *PermissionsCreateCall) SupportsTeamDrives(supportsTeamDrives bool) *Per // TransferOwnership sets the optional parameter "transferOwnership": // Whether to transfer ownership to the specified user and downgrade the // current owner to a writer. This parameter is required as an -// acknowledgement of the side effect. +// acknowledgement of the side effect. File owners can only transfer +// ownership of files existing on My Drive. Files existing in a shared +// drive are owned by the organization that owns that shared drive. +// Ownership transfers are not supported for files and folders in shared +// drives. Organizers of a shared drive can move items from that shared +// drive into their My Drive which transfers the ownership to them. func (c *PermissionsCreateCall) TransferOwnership(transferOwnership bool) *PermissionsCreateCall { c.urlParams_.Set("transferOwnership", fmt.Sprint(transferOwnership)) return c @@ -9311,7 +9244,7 @@ func (c *PermissionsCreateCall) doRequest(alt string) (*http.Response, error) { reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "drive/v3/files/{fileId}/permissions") + urls := googleapi.ResolveRelative(c.s.BasePath, "files/{fileId}/permissions") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("POST", urls, body) if err != nil { @@ -9362,8 +9295,7 @@ func (c *PermissionsCreateCall) Do(opts ...googleapi.CallOption) (*Permission, e } return ret, nil // { - // "description": "Creates a permission for a file or shared drive. **Warning:** Concurrent permissions operations on the same file are not supported; only the last update is applied.", - // "flatPath": "drive/v3/files/{fileId}/permissions", + // "description": "Creates a permission for a file or shared drive. For more information on creating permissions, see Share files, folders \u0026 drives.", // "httpMethod": "POST", // "id": "drive.permissions.create", // "parameterOrder": [ @@ -9377,7 +9309,7 @@ func (c *PermissionsCreateCall) Do(opts ...googleapi.CallOption) (*Permission, e // }, // "enforceSingleParent": { // "default": "false", - // "description": "Deprecated: See `moveToNewOwnersRoot` for details.", + // "description": "Deprecated. See moveToNewOwnersRoot for details.", // "location": "query", // "type": "boolean" // }, @@ -9389,7 +9321,7 @@ func (c *PermissionsCreateCall) Do(opts ...googleapi.CallOption) (*Permission, e // }, // "moveToNewOwnersRoot": { // "default": "false", - // "description": "This parameter will only take effect if the item is not in a shared drive and the request is attempting to transfer the ownership of the item. If set to `true`, the item will be moved to the new owner's My Drive root folder and all prior parents removed. If set to `false`, parents are not changed.", + // "description": "This parameter will only take effect if the item is not in a shared drive and the request is attempting to transfer the ownership of the item. If set to true, the item will be moved to the new owner's My Drive root folder and all prior parents removed. If set to false, parents are not changed.", // "location": "query", // "type": "boolean" // }, @@ -9406,13 +9338,13 @@ func (c *PermissionsCreateCall) Do(opts ...googleapi.CallOption) (*Permission, e // }, // "supportsTeamDrives": { // "default": "false", - // "description": "Deprecated: Use `supportsAllDrives` instead.", + // "description": "Deprecated use supportsAllDrives instead.", // "location": "query", // "type": "boolean" // }, // "transferOwnership": { // "default": "false", - // "description": "Whether to transfer ownership to the specified user and downgrade the current owner to a writer. This parameter is required as an acknowledgement of the side effect.", + // "description": "Whether to transfer ownership to the specified user and downgrade the current owner to a writer. This parameter is required as an acknowledgement of the side effect. File owners can only transfer ownership of files existing on My Drive. Files existing in a shared drive are owned by the organization that owns that shared drive. Ownership transfers are not supported for files and folders in shared drives. Organizers of a shared drive can move items from that shared drive into their My Drive which transfers the ownership to them.", // "location": "query", // "type": "boolean" // }, @@ -9423,7 +9355,7 @@ func (c *PermissionsCreateCall) Do(opts ...googleapi.CallOption) (*Permission, e // "type": "boolean" // } // }, - // "path": "drive/v3/files/{fileId}/permissions", + // "path": "files/{fileId}/permissions", // "request": { // "$ref": "Permission" // }, @@ -9449,9 +9381,7 @@ type PermissionsDeleteCall struct { header_ http.Header } -// Delete: Deletes a permission. **Warning:** Concurrent permissions -// operations on the same file are not supported; only the last update -// is applied. +// Delete: Deletes a permission. // // - fileId: The ID of the file or shared drive. // - permissionId: The ID of the permission. @@ -9471,7 +9401,7 @@ func (c *PermissionsDeleteCall) SupportsAllDrives(supportsAllDrives bool) *Permi } // SupportsTeamDrives sets the optional parameter "supportsTeamDrives": -// Deprecated: Use `supportsAllDrives` instead. +// Deprecated use supportsAllDrives instead. func (c *PermissionsDeleteCall) SupportsTeamDrives(supportsTeamDrives bool) *PermissionsDeleteCall { c.urlParams_.Set("supportsTeamDrives", fmt.Sprint(supportsTeamDrives)) return c @@ -9522,7 +9452,7 @@ func (c *PermissionsDeleteCall) doRequest(alt string) (*http.Response, error) { var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "drive/v3/files/{fileId}/permissions/{permissionId}") + urls := googleapi.ResolveRelative(c.s.BasePath, "files/{fileId}/permissions/{permissionId}") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("DELETE", urls, body) if err != nil { @@ -9549,8 +9479,7 @@ func (c *PermissionsDeleteCall) Do(opts ...googleapi.CallOption) error { } return nil // { - // "description": "Deletes a permission. **Warning:** Concurrent permissions operations on the same file are not supported; only the last update is applied.", - // "flatPath": "drive/v3/files/{fileId}/permissions/{permissionId}", + // "description": "Deletes a permission.", // "httpMethod": "DELETE", // "id": "drive.permissions.delete", // "parameterOrder": [ @@ -9578,7 +9507,7 @@ func (c *PermissionsDeleteCall) Do(opts ...googleapi.CallOption) error { // }, // "supportsTeamDrives": { // "default": "false", - // "description": "Deprecated: Use `supportsAllDrives` instead.", + // "description": "Deprecated use supportsAllDrives instead.", // "location": "query", // "type": "boolean" // }, @@ -9589,7 +9518,7 @@ func (c *PermissionsDeleteCall) Do(opts ...googleapi.CallOption) error { // "type": "boolean" // } // }, - // "path": "drive/v3/files/{fileId}/permissions/{permissionId}", + // "path": "files/{fileId}/permissions/{permissionId}", // "scopes": [ // "https://www.googleapis.com/auth/drive", // "https://www.googleapis.com/auth/drive.file" @@ -9630,7 +9559,7 @@ func (c *PermissionsGetCall) SupportsAllDrives(supportsAllDrives bool) *Permissi } // SupportsTeamDrives sets the optional parameter "supportsTeamDrives": -// Deprecated: Use `supportsAllDrives` instead. +// Deprecated use supportsAllDrives instead. func (c *PermissionsGetCall) SupportsTeamDrives(supportsTeamDrives bool) *PermissionsGetCall { c.urlParams_.Set("supportsTeamDrives", fmt.Sprint(supportsTeamDrives)) return c @@ -9694,7 +9623,7 @@ func (c *PermissionsGetCall) doRequest(alt string) (*http.Response, error) { var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "drive/v3/files/{fileId}/permissions/{permissionId}") + urls := googleapi.ResolveRelative(c.s.BasePath, "files/{fileId}/permissions/{permissionId}") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("GET", urls, body) if err != nil { @@ -9747,7 +9676,6 @@ func (c *PermissionsGetCall) Do(opts ...googleapi.CallOption) (*Permission, erro return ret, nil // { // "description": "Gets a permission by ID.", - // "flatPath": "drive/v3/files/{fileId}/permissions/{permissionId}", // "httpMethod": "GET", // "id": "drive.permissions.get", // "parameterOrder": [ @@ -9775,7 +9703,7 @@ func (c *PermissionsGetCall) Do(opts ...googleapi.CallOption) (*Permission, erro // }, // "supportsTeamDrives": { // "default": "false", - // "description": "Deprecated: Use `supportsAllDrives` instead.", + // "description": "Deprecated use supportsAllDrives instead.", // "location": "query", // "type": "boolean" // }, @@ -9786,7 +9714,7 @@ func (c *PermissionsGetCall) Do(opts ...googleapi.CallOption) (*Permission, erro // "type": "boolean" // } // }, - // "path": "drive/v3/files/{fileId}/permissions/{permissionId}", + // "path": "files/{fileId}/permissions/{permissionId}", // "response": { // "$ref": "Permission" // }, @@ -9857,7 +9785,7 @@ func (c *PermissionsListCall) SupportsAllDrives(supportsAllDrives bool) *Permiss } // SupportsTeamDrives sets the optional parameter "supportsTeamDrives": -// Deprecated: Use `supportsAllDrives` instead. +// Deprecated use supportsAllDrives instead. func (c *PermissionsListCall) SupportsTeamDrives(supportsTeamDrives bool) *PermissionsListCall { c.urlParams_.Set("supportsTeamDrives", fmt.Sprint(supportsTeamDrives)) return c @@ -9921,7 +9849,7 @@ func (c *PermissionsListCall) doRequest(alt string) (*http.Response, error) { var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "drive/v3/files/{fileId}/permissions") + urls := googleapi.ResolveRelative(c.s.BasePath, "files/{fileId}/permissions") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("GET", urls, body) if err != nil { @@ -9973,7 +9901,6 @@ func (c *PermissionsListCall) Do(opts ...googleapi.CallOption) (*PermissionList, return ret, nil // { // "description": "Lists a file's or shared drive's permissions.", - // "flatPath": "drive/v3/files/{fileId}/permissions", // "httpMethod": "GET", // "id": "drive.permissions.list", // "parameterOrder": [ @@ -10012,7 +9939,7 @@ func (c *PermissionsListCall) Do(opts ...googleapi.CallOption) (*PermissionList, // }, // "supportsTeamDrives": { // "default": "false", - // "description": "Deprecated: Use `supportsAllDrives` instead.", + // "description": "Deprecated use supportsAllDrives instead.", // "location": "query", // "type": "boolean" // }, @@ -10023,7 +9950,7 @@ func (c *PermissionsListCall) Do(opts ...googleapi.CallOption) (*PermissionList, // "type": "boolean" // } // }, - // "path": "drive/v3/files/{fileId}/permissions", + // "path": "files/{fileId}/permissions", // "response": { // "$ref": "PermissionList" // }, @@ -10072,9 +9999,7 @@ type PermissionsUpdateCall struct { header_ http.Header } -// Update: Updates a permission with patch semantics. **Warning:** -// Concurrent permissions operations on the same file are not supported; -// only the last update is applied. +// Update: Updates a permission with patch semantics. // // - fileId: The ID of the file or shared drive. // - permissionId: The ID of the permission. @@ -10102,7 +10027,7 @@ func (c *PermissionsUpdateCall) SupportsAllDrives(supportsAllDrives bool) *Permi } // SupportsTeamDrives sets the optional parameter "supportsTeamDrives": -// Deprecated: Use `supportsAllDrives` instead. +// Deprecated use supportsAllDrives instead. func (c *PermissionsUpdateCall) SupportsTeamDrives(supportsTeamDrives bool) *PermissionsUpdateCall { c.urlParams_.Set("supportsTeamDrives", fmt.Sprint(supportsTeamDrives)) return c @@ -10111,7 +10036,12 @@ func (c *PermissionsUpdateCall) SupportsTeamDrives(supportsTeamDrives bool) *Per // TransferOwnership sets the optional parameter "transferOwnership": // Whether to transfer ownership to the specified user and downgrade the // current owner to a writer. This parameter is required as an -// acknowledgement of the side effect. +// acknowledgement of the side effect. File owners can only transfer +// ownership of files existing on My Drive. Files existing in a shared +// drive are owned by the organization that owns that shared drive. +// Ownership transfers are not supported for files and folders in shared +// drives. Organizers of a shared drive can move items from that shared +// drive into their My Drive which transfers the ownership to them. func (c *PermissionsUpdateCall) TransferOwnership(transferOwnership bool) *PermissionsUpdateCall { c.urlParams_.Set("transferOwnership", fmt.Sprint(transferOwnership)) return c @@ -10167,7 +10097,7 @@ func (c *PermissionsUpdateCall) doRequest(alt string) (*http.Response, error) { reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "drive/v3/files/{fileId}/permissions/{permissionId}") + urls := googleapi.ResolveRelative(c.s.BasePath, "files/{fileId}/permissions/{permissionId}") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("PATCH", urls, body) if err != nil { @@ -10219,8 +10149,7 @@ func (c *PermissionsUpdateCall) Do(opts ...googleapi.CallOption) (*Permission, e } return ret, nil // { - // "description": "Updates a permission with patch semantics. **Warning:** Concurrent permissions operations on the same file are not supported; only the last update is applied.", - // "flatPath": "drive/v3/files/{fileId}/permissions/{permissionId}", + // "description": "Updates a permission with patch semantics.", // "httpMethod": "PATCH", // "id": "drive.permissions.update", // "parameterOrder": [ @@ -10254,13 +10183,13 @@ func (c *PermissionsUpdateCall) Do(opts ...googleapi.CallOption) (*Permission, e // }, // "supportsTeamDrives": { // "default": "false", - // "description": "Deprecated: Use `supportsAllDrives` instead.", + // "description": "Deprecated use supportsAllDrives instead.", // "location": "query", // "type": "boolean" // }, // "transferOwnership": { // "default": "false", - // "description": "Whether to transfer ownership to the specified user and downgrade the current owner to a writer. This parameter is required as an acknowledgement of the side effect.", + // "description": "Whether to transfer ownership to the specified user and downgrade the current owner to a writer. This parameter is required as an acknowledgement of the side effect. File owners can only transfer ownership of files existing on My Drive. Files existing in a shared drive are owned by the organization that owns that shared drive. Ownership transfers are not supported for files and folders in shared drives. Organizers of a shared drive can move items from that shared drive into their My Drive which transfers the ownership to them.", // "location": "query", // "type": "boolean" // }, @@ -10271,7 +10200,7 @@ func (c *PermissionsUpdateCall) Do(opts ...googleapi.CallOption) (*Permission, e // "type": "boolean" // } // }, - // "path": "drive/v3/files/{fileId}/permissions/{permissionId}", + // "path": "files/{fileId}/permissions/{permissionId}", // "request": { // "$ref": "Permission" // }, @@ -10350,7 +10279,7 @@ func (c *RepliesCreateCall) doRequest(alt string) (*http.Response, error) { reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "drive/v3/files/{fileId}/comments/{commentId}/replies") + urls := googleapi.ResolveRelative(c.s.BasePath, "files/{fileId}/comments/{commentId}/replies") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("POST", urls, body) if err != nil { @@ -10403,7 +10332,6 @@ func (c *RepliesCreateCall) Do(opts ...googleapi.CallOption) (*Reply, error) { return ret, nil // { // "description": "Creates a reply to a comment.", - // "flatPath": "drive/v3/files/{fileId}/comments/{commentId}/replies", // "httpMethod": "POST", // "id": "drive.replies.create", // "parameterOrder": [ @@ -10424,7 +10352,7 @@ func (c *RepliesCreateCall) Do(opts ...googleapi.CallOption) (*Reply, error) { // "type": "string" // } // }, - // "path": "drive/v3/files/{fileId}/comments/{commentId}/replies", + // "path": "files/{fileId}/comments/{commentId}/replies", // "request": { // "$ref": "Reply" // }, @@ -10499,7 +10427,7 @@ func (c *RepliesDeleteCall) doRequest(alt string) (*http.Response, error) { var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "drive/v3/files/{fileId}/comments/{commentId}/replies/{replyId}") + urls := googleapi.ResolveRelative(c.s.BasePath, "files/{fileId}/comments/{commentId}/replies/{replyId}") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("DELETE", urls, body) if err != nil { @@ -10528,7 +10456,6 @@ func (c *RepliesDeleteCall) Do(opts ...googleapi.CallOption) error { return nil // { // "description": "Deletes a reply.", - // "flatPath": "drive/v3/files/{fileId}/comments/{commentId}/replies/{replyId}", // "httpMethod": "DELETE", // "id": "drive.replies.delete", // "parameterOrder": [ @@ -10556,7 +10483,7 @@ func (c *RepliesDeleteCall) Do(opts ...googleapi.CallOption) error { // "type": "string" // } // }, - // "path": "drive/v3/files/{fileId}/comments/{commentId}/replies/{replyId}", + // "path": "files/{fileId}/comments/{commentId}/replies/{replyId}", // "scopes": [ // "https://www.googleapis.com/auth/drive", // "https://www.googleapis.com/auth/drive.file" @@ -10647,7 +10574,7 @@ func (c *RepliesGetCall) doRequest(alt string) (*http.Response, error) { var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "drive/v3/files/{fileId}/comments/{commentId}/replies/{replyId}") + urls := googleapi.ResolveRelative(c.s.BasePath, "files/{fileId}/comments/{commentId}/replies/{replyId}") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("GET", urls, body) if err != nil { @@ -10701,7 +10628,6 @@ func (c *RepliesGetCall) Do(opts ...googleapi.CallOption) (*Reply, error) { return ret, nil // { // "description": "Gets a reply by ID.", - // "flatPath": "drive/v3/files/{fileId}/comments/{commentId}/replies/{replyId}", // "httpMethod": "GET", // "id": "drive.replies.get", // "parameterOrder": [ @@ -10735,7 +10661,7 @@ func (c *RepliesGetCall) Do(opts ...googleapi.CallOption) (*Reply, error) { // "type": "string" // } // }, - // "path": "drive/v3/files/{fileId}/comments/{commentId}/replies/{replyId}", + // "path": "files/{fileId}/comments/{commentId}/replies/{replyId}", // "response": { // "$ref": "Reply" // }, @@ -10842,7 +10768,7 @@ func (c *RepliesListCall) doRequest(alt string) (*http.Response, error) { var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "drive/v3/files/{fileId}/comments/{commentId}/replies") + urls := googleapi.ResolveRelative(c.s.BasePath, "files/{fileId}/comments/{commentId}/replies") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("GET", urls, body) if err != nil { @@ -10895,7 +10821,6 @@ func (c *RepliesListCall) Do(opts ...googleapi.CallOption) (*ReplyList, error) { return ret, nil // { // "description": "Lists a comment's replies.", - // "flatPath": "drive/v3/files/{fileId}/comments/{commentId}/replies", // "httpMethod": "GET", // "id": "drive.replies.list", // "parameterOrder": [ @@ -10936,7 +10861,7 @@ func (c *RepliesListCall) Do(opts ...googleapi.CallOption) (*ReplyList, error) { // "type": "string" // } // }, - // "path": "drive/v3/files/{fileId}/comments/{commentId}/replies", + // "path": "files/{fileId}/comments/{commentId}/replies", // "response": { // "$ref": "ReplyList" // }, @@ -11037,7 +10962,7 @@ func (c *RepliesUpdateCall) doRequest(alt string) (*http.Response, error) { reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "drive/v3/files/{fileId}/comments/{commentId}/replies/{replyId}") + urls := googleapi.ResolveRelative(c.s.BasePath, "files/{fileId}/comments/{commentId}/replies/{replyId}") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("PATCH", urls, body) if err != nil { @@ -11091,7 +11016,6 @@ func (c *RepliesUpdateCall) Do(opts ...googleapi.CallOption) (*Reply, error) { return ret, nil // { // "description": "Updates a reply with patch semantics.", - // "flatPath": "drive/v3/files/{fileId}/comments/{commentId}/replies/{replyId}", // "httpMethod": "PATCH", // "id": "drive.replies.update", // "parameterOrder": [ @@ -11119,7 +11043,7 @@ func (c *RepliesUpdateCall) Do(opts ...googleapi.CallOption) (*Reply, error) { // "type": "string" // } // }, - // "path": "drive/v3/files/{fileId}/comments/{commentId}/replies/{replyId}", + // "path": "files/{fileId}/comments/{commentId}/replies/{replyId}", // "request": { // "$ref": "Reply" // }, @@ -11194,7 +11118,7 @@ func (c *RevisionsDeleteCall) doRequest(alt string) (*http.Response, error) { var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "drive/v3/files/{fileId}/revisions/{revisionId}") + urls := googleapi.ResolveRelative(c.s.BasePath, "files/{fileId}/revisions/{revisionId}") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("DELETE", urls, body) if err != nil { @@ -11222,7 +11146,6 @@ func (c *RevisionsDeleteCall) Do(opts ...googleapi.CallOption) error { return nil // { // "description": "Permanently deletes a file version. You can only delete revisions for files with binary content in Google Drive, like images or videos. Revisions for other files, like Google Docs or Sheets, and the last remaining file version can't be deleted.", - // "flatPath": "drive/v3/files/{fileId}/revisions/{revisionId}", // "httpMethod": "DELETE", // "id": "drive.revisions.delete", // "parameterOrder": [ @@ -11243,7 +11166,7 @@ func (c *RevisionsDeleteCall) Do(opts ...googleapi.CallOption) error { // "type": "string" // } // }, - // "path": "drive/v3/files/{fileId}/revisions/{revisionId}", + // "path": "files/{fileId}/revisions/{revisionId}", // "scopes": [ // "https://www.googleapis.com/auth/drive", // "https://www.googleapis.com/auth/drive.appdata", @@ -11333,7 +11256,7 @@ func (c *RevisionsGetCall) doRequest(alt string) (*http.Response, error) { var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "drive/v3/files/{fileId}/revisions/{revisionId}") + urls := googleapi.ResolveRelative(c.s.BasePath, "files/{fileId}/revisions/{revisionId}") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("GET", urls, body) if err != nil { @@ -11402,7 +11325,6 @@ func (c *RevisionsGetCall) Do(opts ...googleapi.CallOption) (*Revision, error) { return ret, nil // { // "description": "Gets a revision's metadata or content by ID.", - // "flatPath": "drive/v3/files/{fileId}/revisions/{revisionId}", // "httpMethod": "GET", // "id": "drive.revisions.get", // "parameterOrder": [ @@ -11429,7 +11351,7 @@ func (c *RevisionsGetCall) Do(opts ...googleapi.CallOption) (*Revision, error) { // "type": "string" // } // }, - // "path": "drive/v3/files/{fileId}/revisions/{revisionId}", + // "path": "files/{fileId}/revisions/{revisionId}", // "response": { // "$ref": "Revision" // }, @@ -11531,7 +11453,7 @@ func (c *RevisionsListCall) doRequest(alt string) (*http.Response, error) { var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "drive/v3/files/{fileId}/revisions") + urls := googleapi.ResolveRelative(c.s.BasePath, "files/{fileId}/revisions") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("GET", urls, body) if err != nil { @@ -11583,7 +11505,6 @@ func (c *RevisionsListCall) Do(opts ...googleapi.CallOption) (*RevisionList, err return ret, nil // { // "description": "Lists a file's revisions.", - // "flatPath": "drive/v3/files/{fileId}/revisions", // "httpMethod": "GET", // "id": "drive.revisions.list", // "parameterOrder": [ @@ -11611,7 +11532,7 @@ func (c *RevisionsListCall) Do(opts ...googleapi.CallOption) (*RevisionList, err // "type": "string" // } // }, - // "path": "drive/v3/files/{fileId}/revisions", + // "path": "files/{fileId}/revisions", // "response": { // "$ref": "RevisionList" // }, @@ -11713,7 +11634,7 @@ func (c *RevisionsUpdateCall) doRequest(alt string) (*http.Response, error) { reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "drive/v3/files/{fileId}/revisions/{revisionId}") + urls := googleapi.ResolveRelative(c.s.BasePath, "files/{fileId}/revisions/{revisionId}") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("PATCH", urls, body) if err != nil { @@ -11766,7 +11687,6 @@ func (c *RevisionsUpdateCall) Do(opts ...googleapi.CallOption) (*Revision, error return ret, nil // { // "description": "Updates a revision with patch semantics.", - // "flatPath": "drive/v3/files/{fileId}/revisions/{revisionId}", // "httpMethod": "PATCH", // "id": "drive.revisions.update", // "parameterOrder": [ @@ -11787,7 +11707,7 @@ func (c *RevisionsUpdateCall) Do(opts ...googleapi.CallOption) (*Revision, error // "type": "string" // } // }, - // "path": "drive/v3/files/{fileId}/revisions/{revisionId}", + // "path": "files/{fileId}/revisions/{revisionId}", // "request": { // "$ref": "Revision" // }, @@ -11813,7 +11733,7 @@ type TeamdrivesCreateCall struct { header_ http.Header } -// Create: Deprecated: Use `drives.create` instead. +// Create: Deprecated use drives.create instead. // // - requestId: An ID, such as a random UUID, which uniquely identifies // this user's request for idempotent creation of a Team Drive. A @@ -11868,7 +11788,7 @@ func (c *TeamdrivesCreateCall) doRequest(alt string) (*http.Response, error) { reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "drive/v3/teamdrives") + urls := googleapi.ResolveRelative(c.s.BasePath, "teamdrives") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("POST", urls, body) if err != nil { @@ -11916,8 +11836,7 @@ func (c *TeamdrivesCreateCall) Do(opts ...googleapi.CallOption) (*TeamDrive, err } return ret, nil // { - // "description": "Deprecated: Use `drives.create` instead.", - // "flatPath": "drive/v3/teamdrives", + // "description": "Deprecated use drives.create instead.", // "httpMethod": "POST", // "id": "drive.teamdrives.create", // "parameterOrder": [ @@ -11931,7 +11850,7 @@ func (c *TeamdrivesCreateCall) Do(opts ...googleapi.CallOption) (*TeamDrive, err // "type": "string" // } // }, - // "path": "drive/v3/teamdrives", + // "path": "teamdrives", // "request": { // "$ref": "TeamDrive" // }, @@ -11955,7 +11874,7 @@ type TeamdrivesDeleteCall struct { header_ http.Header } -// Delete: Deprecated: Use `drives.delete` instead. +// Delete: Deprecated use drives.delete instead. // // - teamDriveId: The ID of the Team Drive. func (r *TeamdrivesService) Delete(teamDriveId string) *TeamdrivesDeleteCall { @@ -11999,7 +11918,7 @@ func (c *TeamdrivesDeleteCall) doRequest(alt string) (*http.Response, error) { var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "drive/v3/teamdrives/{teamDriveId}") + urls := googleapi.ResolveRelative(c.s.BasePath, "teamdrives/{teamDriveId}") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("DELETE", urls, body) if err != nil { @@ -12025,8 +11944,7 @@ func (c *TeamdrivesDeleteCall) Do(opts ...googleapi.CallOption) error { } return nil // { - // "description": "Deprecated: Use `drives.delete` instead.", - // "flatPath": "drive/v3/teamdrives/{teamDriveId}", + // "description": "Deprecated use drives.delete instead.", // "httpMethod": "DELETE", // "id": "drive.teamdrives.delete", // "parameterOrder": [ @@ -12040,7 +11958,7 @@ func (c *TeamdrivesDeleteCall) Do(opts ...googleapi.CallOption) error { // "type": "string" // } // }, - // "path": "drive/v3/teamdrives/{teamDriveId}", + // "path": "teamdrives/{teamDriveId}", // "scopes": [ // "https://www.googleapis.com/auth/drive" // ] @@ -12059,7 +11977,7 @@ type TeamdrivesGetCall struct { header_ http.Header } -// Get: Deprecated: Use `drives.get` instead. +// Get: Deprecated use drives.get instead. // // - teamDriveId: The ID of the Team Drive. func (r *TeamdrivesService) Get(teamDriveId string) *TeamdrivesGetCall { @@ -12125,7 +12043,7 @@ func (c *TeamdrivesGetCall) doRequest(alt string) (*http.Response, error) { var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "drive/v3/teamdrives/{teamDriveId}") + urls := googleapi.ResolveRelative(c.s.BasePath, "teamdrives/{teamDriveId}") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("GET", urls, body) if err != nil { @@ -12176,8 +12094,7 @@ func (c *TeamdrivesGetCall) Do(opts ...googleapi.CallOption) (*TeamDrive, error) } return ret, nil // { - // "description": "Deprecated: Use `drives.get` instead.", - // "flatPath": "drive/v3/teamdrives/{teamDriveId}", + // "description": "Deprecated use drives.get instead.", // "httpMethod": "GET", // "id": "drive.teamdrives.get", // "parameterOrder": [ @@ -12197,7 +12114,7 @@ func (c *TeamdrivesGetCall) Do(opts ...googleapi.CallOption) (*TeamDrive, error) // "type": "boolean" // } // }, - // "path": "drive/v3/teamdrives/{teamDriveId}", + // "path": "teamdrives/{teamDriveId}", // "response": { // "$ref": "TeamDrive" // }, @@ -12219,7 +12136,7 @@ type TeamdrivesListCall struct { header_ http.Header } -// List: Deprecated: Use `drives.list` instead. +// List: Deprecated use drives.list instead. func (r *TeamdrivesService) List() *TeamdrivesListCall { c := &TeamdrivesListCall{s: r.s, urlParams_: make(gensupport.URLParams)} return c @@ -12303,7 +12220,7 @@ func (c *TeamdrivesListCall) doRequest(alt string) (*http.Response, error) { var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "drive/v3/teamdrives") + urls := googleapi.ResolveRelative(c.s.BasePath, "teamdrives") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("GET", urls, body) if err != nil { @@ -12351,11 +12268,9 @@ func (c *TeamdrivesListCall) Do(opts ...googleapi.CallOption) (*TeamDriveList, e } return ret, nil // { - // "description": "Deprecated: Use `drives.list` instead.", - // "flatPath": "drive/v3/teamdrives", + // "description": "Deprecated use drives.list instead.", // "httpMethod": "GET", // "id": "drive.teamdrives.list", - // "parameterOrder": [], // "parameters": { // "pageSize": { // "default": "10", @@ -12383,7 +12298,7 @@ func (c *TeamdrivesListCall) Do(opts ...googleapi.CallOption) (*TeamDriveList, e // "type": "boolean" // } // }, - // "path": "drive/v3/teamdrives", + // "path": "teamdrives", // "response": { // "$ref": "TeamDriveList" // }, @@ -12427,7 +12342,7 @@ type TeamdrivesUpdateCall struct { header_ http.Header } -// Update: Deprecated: Use `drives.update` instead. +// Update: Deprecated use drives.update instead // // - teamDriveId: The ID of the Team Drive. func (r *TeamdrivesService) Update(teamDriveId string, teamdrive *TeamDrive) *TeamdrivesUpdateCall { @@ -12486,7 +12401,7 @@ func (c *TeamdrivesUpdateCall) doRequest(alt string) (*http.Response, error) { reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "drive/v3/teamdrives/{teamDriveId}") + urls := googleapi.ResolveRelative(c.s.BasePath, "teamdrives/{teamDriveId}") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("PATCH", urls, body) if err != nil { @@ -12537,8 +12452,7 @@ func (c *TeamdrivesUpdateCall) Do(opts ...googleapi.CallOption) (*TeamDrive, err } return ret, nil // { - // "description": "Deprecated: Use `drives.update` instead.", - // "flatPath": "drive/v3/teamdrives/{teamDriveId}", + // "description": "Deprecated use drives.update instead", // "httpMethod": "PATCH", // "id": "drive.teamdrives.update", // "parameterOrder": [ @@ -12558,7 +12472,7 @@ func (c *TeamdrivesUpdateCall) Do(opts ...googleapi.CallOption) (*TeamDrive, err // "type": "boolean" // } // }, - // "path": "drive/v3/teamdrives/{teamDriveId}", + // "path": "teamdrives/{teamDriveId}", // "request": { // "$ref": "TeamDrive" // }, diff --git a/drivelabels/v2/drivelabels-api.json b/drivelabels/v2/drivelabels-api.json index d99e47df974..6a0e37ebf00 100644 --- a/drivelabels/v2/drivelabels-api.json +++ b/drivelabels/v2/drivelabels-api.json @@ -898,7 +898,7 @@ } } }, - "revision": "20230428", + "revision": "20230517", "rootUrl": "https://drivelabels.googleapis.com/", "schemas": { "GoogleAppsDriveLabelsV2BadgeColors": { @@ -2858,7 +2858,7 @@ "type": "object" }, "GoogleTypeColor": { - "description": "Represents a color in the RGBA color space. This representation is designed for simplicity of conversion to/from color representations in various languages over compactness. For example, the fields of this representation can be trivially provided to the constructor of `java.awt.Color` in Java; it can also be trivially provided to UIColor's `+colorWithRed:green:blue:alpha` method in iOS; and, with just a little work, it can be easily formatted into a CSS `rgba()` string in JavaScript. This reference page doesn't carry information about the absolute color space that should be used to interpret the RGB value (e.g. sRGB, Adobe RGB, DCI-P3, BT.2020, etc.). By default, applications should assume the sRGB color space. When color equality needs to be decided, implementations, unless documented otherwise, treat two colors as equal if all their red, green, blue, and alpha values each differ by at most 1e-5. Example (Java): import com.google.type.Color; // ... public static java.awt.Color fromProto(Color protocolor) { float alpha = protocolor.hasAlpha() ? protocolor.getAlpha().getValue() : 1.0; return new java.awt.Color( protocolor.getRed(), protocolor.getGreen(), protocolor.getBlue(), alpha); } public static Color toProto(java.awt.Color color) { float red = (float) color.getRed(); float green = (float) color.getGreen(); float blue = (float) color.getBlue(); float denominator = 255.0; Color.Builder resultBuilder = Color .newBuilder() .setRed(red / denominator) .setGreen(green / denominator) .setBlue(blue / denominator); int alpha = color.getAlpha(); if (alpha != 255) { result.setAlpha( FloatValue .newBuilder() .setValue(((float) alpha) / denominator) .build()); } return resultBuilder.build(); } // ... Example (iOS / Obj-C): // ... static UIColor* fromProto(Color* protocolor) { float red = [protocolor red]; float green = [protocolor green]; float blue = [protocolor blue]; FloatValue* alpha_wrapper = [protocolor alpha]; float alpha = 1.0; if (alpha_wrapper != nil) { alpha = [alpha_wrapper value]; } return [UIColor colorWithRed:red green:green blue:blue alpha:alpha]; } static Color* toProto(UIColor* color) { CGFloat red, green, blue, alpha; if (![color getRed:\u0026red green:\u0026green blue:\u0026blue alpha:\u0026alpha]) { return nil; } Color* result = [[Color alloc] init]; [result setRed:red]; [result setGreen:green]; [result setBlue:blue]; if (alpha \u003c= 0.9999) { [result setAlpha:floatWrapperWithValue(alpha)]; } [result autorelease]; return result; } // ... Example (JavaScript): // ... var protoToCssColor = function(rgb_color) { var redFrac = rgb_color.red || 0.0; var greenFrac = rgb_color.green || 0.0; var blueFrac = rgb_color.blue || 0.0; var red = Math.floor(redFrac * 255); var green = Math.floor(greenFrac * 255); var blue = Math.floor(blueFrac * 255); if (!('alpha' in rgb_color)) { return rgbToCssColor(red, green, blue); } var alphaFrac = rgb_color.alpha.value || 0.0; var rgbParams = [red, green, blue].join(','); return ['rgba(', rgbParams, ',', alphaFrac, ')'].join(''); }; var rgbToCssColor = function(red, green, blue) { var rgbNumber = new Number((red \u003c\u003c 16) | (green \u003c\u003c 8) | blue); var hexString = rgbNumber.toString(16); var missingZeros = 6 - hexString.length; var resultBuilder = ['#']; for (var i = 0; i \u003c missingZeros; i++) { resultBuilder.push('0'); } resultBuilder.push(hexString); return resultBuilder.join(''); }; // ...", + "description": "Represents a color in the RGBA color space. This representation is designed for simplicity of conversion to and from color representations in various languages over compactness. For example, the fields of this representation can be trivially provided to the constructor of `java.awt.Color` in Java; it can also be trivially provided to UIColor's `+colorWithRed:green:blue:alpha` method in iOS; and, with just a little work, it can be easily formatted into a CSS `rgba()` string in JavaScript. This reference page does not have information about the absolute color space that should be used to interpret the RGB value—for example, sRGB, Adobe RGB, DCI-P3, and BT.2020. By default, applications should assume the sRGB color space. When color equality needs to be decided, implementations, unless documented otherwise, treat two colors as equal if all their red, green, blue, and alpha values each differ by at most `1e-5`. Example (Java): import com.google.type.Color; // ... public static java.awt.Color fromProto(Color protocolor) { float alpha = protocolor.hasAlpha() ? protocolor.getAlpha().getValue() : 1.0; return new java.awt.Color( protocolor.getRed(), protocolor.getGreen(), protocolor.getBlue(), alpha); } public static Color toProto(java.awt.Color color) { float red = (float) color.getRed(); float green = (float) color.getGreen(); float blue = (float) color.getBlue(); float denominator = 255.0; Color.Builder resultBuilder = Color .newBuilder() .setRed(red / denominator) .setGreen(green / denominator) .setBlue(blue / denominator); int alpha = color.getAlpha(); if (alpha != 255) { result.setAlpha( FloatValue .newBuilder() .setValue(((float) alpha) / denominator) .build()); } return resultBuilder.build(); } // ... Example (iOS / Obj-C): // ... static UIColor* fromProto(Color* protocolor) { float red = [protocolor red]; float green = [protocolor green]; float blue = [protocolor blue]; FloatValue* alpha_wrapper = [protocolor alpha]; float alpha = 1.0; if (alpha_wrapper != nil) { alpha = [alpha_wrapper value]; } return [UIColor colorWithRed:red green:green blue:blue alpha:alpha]; } static Color* toProto(UIColor* color) { CGFloat red, green, blue, alpha; if (![color getRed:\u0026red green:\u0026green blue:\u0026blue alpha:\u0026alpha]) { return nil; } Color* result = [[Color alloc] init]; [result setRed:red]; [result setGreen:green]; [result setBlue:blue]; if (alpha \u003c= 0.9999) { [result setAlpha:floatWrapperWithValue(alpha)]; } [result autorelease]; return result; } // ... Example (JavaScript): // ... var protoToCssColor = function(rgb_color) { var redFrac = rgb_color.red || 0.0; var greenFrac = rgb_color.green || 0.0; var blueFrac = rgb_color.blue || 0.0; var red = Math.floor(redFrac * 255); var green = Math.floor(greenFrac * 255); var blue = Math.floor(blueFrac * 255); if (!('alpha' in rgb_color)) { return rgbToCssColor(red, green, blue); } var alphaFrac = rgb_color.alpha.value || 0.0; var rgbParams = [red, green, blue].join(','); return ['rgba(', rgbParams, ',', alphaFrac, ')'].join(''); }; var rgbToCssColor = function(red, green, blue) { var rgbNumber = new Number((red \u003c\u003c 16) | (green \u003c\u003c 8) | blue); var hexString = rgbNumber.toString(16); var missingZeros = 6 - hexString.length; var resultBuilder = ['#']; for (var i = 0; i \u003c missingZeros; i++) { resultBuilder.push('0'); } resultBuilder.push(hexString); return resultBuilder.join(''); }; // ...", "id": "GoogleTypeColor", "properties": { "alpha": { diff --git a/drivelabels/v2/drivelabels-gen.go b/drivelabels/v2/drivelabels-gen.go index 524637c2825..5b2372858fc 100644 --- a/drivelabels/v2/drivelabels-gen.go +++ b/drivelabels/v2/drivelabels-gen.go @@ -3404,23 +3404,23 @@ type GoogleProtobufEmpty struct { } // GoogleTypeColor: Represents a color in the RGBA color space. This -// representation is designed for simplicity of conversion to/from color -// representations in various languages over compactness. For example, -// the fields of this representation can be trivially provided to the -// constructor of `java.awt.Color` in Java; it can also be trivially -// provided to UIColor's `+colorWithRed:green:blue:alpha` method in iOS; -// and, with just a little work, it can be easily formatted into a CSS -// `rgba()` string in JavaScript. This reference page doesn't carry -// information about the absolute color space that should be used to -// interpret the RGB value (e.g. sRGB, Adobe RGB, DCI-P3, BT.2020, -// etc.). By default, applications should assume the sRGB color space. -// When color equality needs to be decided, implementations, unless -// documented otherwise, treat two colors as equal if all their red, -// green, blue, and alpha values each differ by at most 1e-5. Example -// (Java): import com.google.type.Color; // ... public static -// java.awt.Color fromProto(Color protocolor) { float alpha = -// protocolor.hasAlpha() ? protocolor.getAlpha().getValue() : 1.0; -// return new java.awt.Color( protocolor.getRed(), +// representation is designed for simplicity of conversion to and from +// color representations in various languages over compactness. For +// example, the fields of this representation can be trivially provided +// to the constructor of `java.awt.Color` in Java; it can also be +// trivially provided to UIColor's `+colorWithRed:green:blue:alpha` +// method in iOS; and, with just a little work, it can be easily +// formatted into a CSS `rgba()` string in JavaScript. This reference +// page does not have information about the absolute color space that +// should be used to interpret the RGB value—for example, sRGB, Adobe +// RGB, DCI-P3, and BT.2020. By default, applications should assume the +// sRGB color space. When color equality needs to be decided, +// implementations, unless documented otherwise, treat two colors as +// equal if all their red, green, blue, and alpha values each differ by +// at most `1e-5`. Example (Java): import com.google.type.Color; // ... +// public static java.awt.Color fromProto(Color protocolor) { float +// alpha = protocolor.hasAlpha() ? protocolor.getAlpha().getValue() : +// 1.0; return new java.awt.Color( protocolor.getRed(), // protocolor.getGreen(), protocolor.getBlue(), alpha); } public static // Color toProto(java.awt.Color color) { float red = (float) // color.getRed(); float green = (float) color.getGreen(); float blue = diff --git a/drivelabels/v2beta/drivelabels-api.json b/drivelabels/v2beta/drivelabels-api.json index 0422246e0ed..c9c019c296c 100644 --- a/drivelabels/v2beta/drivelabels-api.json +++ b/drivelabels/v2beta/drivelabels-api.json @@ -898,7 +898,7 @@ } } }, - "revision": "20230428", + "revision": "20230517", "rootUrl": "https://drivelabels.googleapis.com/", "schemas": { "GoogleAppsDriveLabelsV2betaBadgeColors": { @@ -2858,7 +2858,7 @@ "type": "object" }, "GoogleTypeColor": { - "description": "Represents a color in the RGBA color space. This representation is designed for simplicity of conversion to/from color representations in various languages over compactness. For example, the fields of this representation can be trivially provided to the constructor of `java.awt.Color` in Java; it can also be trivially provided to UIColor's `+colorWithRed:green:blue:alpha` method in iOS; and, with just a little work, it can be easily formatted into a CSS `rgba()` string in JavaScript. This reference page doesn't carry information about the absolute color space that should be used to interpret the RGB value (e.g. sRGB, Adobe RGB, DCI-P3, BT.2020, etc.). By default, applications should assume the sRGB color space. When color equality needs to be decided, implementations, unless documented otherwise, treat two colors as equal if all their red, green, blue, and alpha values each differ by at most 1e-5. Example (Java): import com.google.type.Color; // ... public static java.awt.Color fromProto(Color protocolor) { float alpha = protocolor.hasAlpha() ? protocolor.getAlpha().getValue() : 1.0; return new java.awt.Color( protocolor.getRed(), protocolor.getGreen(), protocolor.getBlue(), alpha); } public static Color toProto(java.awt.Color color) { float red = (float) color.getRed(); float green = (float) color.getGreen(); float blue = (float) color.getBlue(); float denominator = 255.0; Color.Builder resultBuilder = Color .newBuilder() .setRed(red / denominator) .setGreen(green / denominator) .setBlue(blue / denominator); int alpha = color.getAlpha(); if (alpha != 255) { result.setAlpha( FloatValue .newBuilder() .setValue(((float) alpha) / denominator) .build()); } return resultBuilder.build(); } // ... Example (iOS / Obj-C): // ... static UIColor* fromProto(Color* protocolor) { float red = [protocolor red]; float green = [protocolor green]; float blue = [protocolor blue]; FloatValue* alpha_wrapper = [protocolor alpha]; float alpha = 1.0; if (alpha_wrapper != nil) { alpha = [alpha_wrapper value]; } return [UIColor colorWithRed:red green:green blue:blue alpha:alpha]; } static Color* toProto(UIColor* color) { CGFloat red, green, blue, alpha; if (![color getRed:\u0026red green:\u0026green blue:\u0026blue alpha:\u0026alpha]) { return nil; } Color* result = [[Color alloc] init]; [result setRed:red]; [result setGreen:green]; [result setBlue:blue]; if (alpha \u003c= 0.9999) { [result setAlpha:floatWrapperWithValue(alpha)]; } [result autorelease]; return result; } // ... Example (JavaScript): // ... var protoToCssColor = function(rgb_color) { var redFrac = rgb_color.red || 0.0; var greenFrac = rgb_color.green || 0.0; var blueFrac = rgb_color.blue || 0.0; var red = Math.floor(redFrac * 255); var green = Math.floor(greenFrac * 255); var blue = Math.floor(blueFrac * 255); if (!('alpha' in rgb_color)) { return rgbToCssColor(red, green, blue); } var alphaFrac = rgb_color.alpha.value || 0.0; var rgbParams = [red, green, blue].join(','); return ['rgba(', rgbParams, ',', alphaFrac, ')'].join(''); }; var rgbToCssColor = function(red, green, blue) { var rgbNumber = new Number((red \u003c\u003c 16) | (green \u003c\u003c 8) | blue); var hexString = rgbNumber.toString(16); var missingZeros = 6 - hexString.length; var resultBuilder = ['#']; for (var i = 0; i \u003c missingZeros; i++) { resultBuilder.push('0'); } resultBuilder.push(hexString); return resultBuilder.join(''); }; // ...", + "description": "Represents a color in the RGBA color space. This representation is designed for simplicity of conversion to and from color representations in various languages over compactness. For example, the fields of this representation can be trivially provided to the constructor of `java.awt.Color` in Java; it can also be trivially provided to UIColor's `+colorWithRed:green:blue:alpha` method in iOS; and, with just a little work, it can be easily formatted into a CSS `rgba()` string in JavaScript. This reference page does not have information about the absolute color space that should be used to interpret the RGB value—for example, sRGB, Adobe RGB, DCI-P3, and BT.2020. By default, applications should assume the sRGB color space. When color equality needs to be decided, implementations, unless documented otherwise, treat two colors as equal if all their red, green, blue, and alpha values each differ by at most `1e-5`. Example (Java): import com.google.type.Color; // ... public static java.awt.Color fromProto(Color protocolor) { float alpha = protocolor.hasAlpha() ? protocolor.getAlpha().getValue() : 1.0; return new java.awt.Color( protocolor.getRed(), protocolor.getGreen(), protocolor.getBlue(), alpha); } public static Color toProto(java.awt.Color color) { float red = (float) color.getRed(); float green = (float) color.getGreen(); float blue = (float) color.getBlue(); float denominator = 255.0; Color.Builder resultBuilder = Color .newBuilder() .setRed(red / denominator) .setGreen(green / denominator) .setBlue(blue / denominator); int alpha = color.getAlpha(); if (alpha != 255) { result.setAlpha( FloatValue .newBuilder() .setValue(((float) alpha) / denominator) .build()); } return resultBuilder.build(); } // ... Example (iOS / Obj-C): // ... static UIColor* fromProto(Color* protocolor) { float red = [protocolor red]; float green = [protocolor green]; float blue = [protocolor blue]; FloatValue* alpha_wrapper = [protocolor alpha]; float alpha = 1.0; if (alpha_wrapper != nil) { alpha = [alpha_wrapper value]; } return [UIColor colorWithRed:red green:green blue:blue alpha:alpha]; } static Color* toProto(UIColor* color) { CGFloat red, green, blue, alpha; if (![color getRed:\u0026red green:\u0026green blue:\u0026blue alpha:\u0026alpha]) { return nil; } Color* result = [[Color alloc] init]; [result setRed:red]; [result setGreen:green]; [result setBlue:blue]; if (alpha \u003c= 0.9999) { [result setAlpha:floatWrapperWithValue(alpha)]; } [result autorelease]; return result; } // ... Example (JavaScript): // ... var protoToCssColor = function(rgb_color) { var redFrac = rgb_color.red || 0.0; var greenFrac = rgb_color.green || 0.0; var blueFrac = rgb_color.blue || 0.0; var red = Math.floor(redFrac * 255); var green = Math.floor(greenFrac * 255); var blue = Math.floor(blueFrac * 255); if (!('alpha' in rgb_color)) { return rgbToCssColor(red, green, blue); } var alphaFrac = rgb_color.alpha.value || 0.0; var rgbParams = [red, green, blue].join(','); return ['rgba(', rgbParams, ',', alphaFrac, ')'].join(''); }; var rgbToCssColor = function(red, green, blue) { var rgbNumber = new Number((red \u003c\u003c 16) | (green \u003c\u003c 8) | blue); var hexString = rgbNumber.toString(16); var missingZeros = 6 - hexString.length; var resultBuilder = ['#']; for (var i = 0; i \u003c missingZeros; i++) { resultBuilder.push('0'); } resultBuilder.push(hexString); return resultBuilder.join(''); }; // ...", "id": "GoogleTypeColor", "properties": { "alpha": { diff --git a/drivelabels/v2beta/drivelabels-gen.go b/drivelabels/v2beta/drivelabels-gen.go index af0c02a9fba..b323502a403 100644 --- a/drivelabels/v2beta/drivelabels-gen.go +++ b/drivelabels/v2beta/drivelabels-gen.go @@ -3408,23 +3408,23 @@ type GoogleProtobufEmpty struct { } // GoogleTypeColor: Represents a color in the RGBA color space. This -// representation is designed for simplicity of conversion to/from color -// representations in various languages over compactness. For example, -// the fields of this representation can be trivially provided to the -// constructor of `java.awt.Color` in Java; it can also be trivially -// provided to UIColor's `+colorWithRed:green:blue:alpha` method in iOS; -// and, with just a little work, it can be easily formatted into a CSS -// `rgba()` string in JavaScript. This reference page doesn't carry -// information about the absolute color space that should be used to -// interpret the RGB value (e.g. sRGB, Adobe RGB, DCI-P3, BT.2020, -// etc.). By default, applications should assume the sRGB color space. -// When color equality needs to be decided, implementations, unless -// documented otherwise, treat two colors as equal if all their red, -// green, blue, and alpha values each differ by at most 1e-5. Example -// (Java): import com.google.type.Color; // ... public static -// java.awt.Color fromProto(Color protocolor) { float alpha = -// protocolor.hasAlpha() ? protocolor.getAlpha().getValue() : 1.0; -// return new java.awt.Color( protocolor.getRed(), +// representation is designed for simplicity of conversion to and from +// color representations in various languages over compactness. For +// example, the fields of this representation can be trivially provided +// to the constructor of `java.awt.Color` in Java; it can also be +// trivially provided to UIColor's `+colorWithRed:green:blue:alpha` +// method in iOS; and, with just a little work, it can be easily +// formatted into a CSS `rgba()` string in JavaScript. This reference +// page does not have information about the absolute color space that +// should be used to interpret the RGB value—for example, sRGB, Adobe +// RGB, DCI-P3, and BT.2020. By default, applications should assume the +// sRGB color space. When color equality needs to be decided, +// implementations, unless documented otherwise, treat two colors as +// equal if all their red, green, blue, and alpha values each differ by +// at most `1e-5`. Example (Java): import com.google.type.Color; // ... +// public static java.awt.Color fromProto(Color protocolor) { float +// alpha = protocolor.hasAlpha() ? protocolor.getAlpha().getValue() : +// 1.0; return new java.awt.Color( protocolor.getRed(), // protocolor.getGreen(), protocolor.getBlue(), alpha); } public static // Color toProto(java.awt.Color color) { float red = (float) // color.getRed(); float green = (float) color.getGreen(); float blue = diff --git a/firebasestorage/v1beta/firebasestorage-api.json b/firebasestorage/v1beta/firebasestorage-api.json index 9c39ed2f586..6a9f1a2c39f 100644 --- a/firebasestorage/v1beta/firebasestorage-api.json +++ b/firebasestorage/v1beta/firebasestorage-api.json @@ -122,7 +122,7 @@ ], "parameters": { "bucket": { - "description": "Required. Resource name of the bucket, mirrors the ID of the underlying Google Cloud Storage bucket, `projects/{project_number}/buckets/{bucket_id}`.", + "description": "Required. Resource name of the bucket, mirrors the ID of the underlying Google Cloud Storage bucket, `projects/{project_id_or_number}/buckets/{bucket_id}`.", "location": "path", "pattern": "^projects/[^/]+/buckets/[^/]+$", "required": true, @@ -151,7 +151,7 @@ ], "parameters": { "name": { - "description": "Required. Resource name of the bucket, mirrors the ID of the underlying Google Cloud Storage bucket, `projects/{project_number}/buckets/{bucket_id}`.", + "description": "Required. Resource name of the bucket, mirrors the ID of the underlying Google Cloud Storage bucket, `projects/{project_id_or_number}/buckets/{bucket_id}`.", "location": "path", "pattern": "^projects/[^/]+/buckets/[^/]+$", "required": true, @@ -188,7 +188,7 @@ "type": "string" }, "parent": { - "description": "Required. Resource name of the parent Firebase project, `projects/{project_number}`.", + "description": "Required. Resource name of the parent Firebase project, `projects/{project_id_or_number}`.", "location": "path", "pattern": "^projects/[^/]+$", "required": true, @@ -214,7 +214,7 @@ ], "parameters": { "bucket": { - "description": "Required. Resource name of the bucket, mirrors the ID of the underlying Google Cloud Storage bucket, `projects/{project_number}/buckets/{bucket_id}`.", + "description": "Required. Resource name of the bucket, mirrors the ID of the underlying Google Cloud Storage bucket, `projects/{project_id_or_number}/buckets/{bucket_id}`.", "location": "path", "pattern": "^projects/[^/]+/buckets/[^/]+$", "required": true, @@ -238,7 +238,7 @@ } } }, - "revision": "20221007", + "revision": "20230515", "rootUrl": "https://firebasestorage.googleapis.com/", "schemas": { "AddFirebaseRequest": { diff --git a/firebasestorage/v1beta/firebasestorage-gen.go b/firebasestorage/v1beta/firebasestorage-gen.go index e266de80287..b907a983d61 100644 --- a/firebasestorage/v1beta/firebasestorage-gen.go +++ b/firebasestorage/v1beta/firebasestorage-gen.go @@ -400,7 +400,7 @@ type ProjectsBucketsAddFirebaseCall struct { // // - bucket: Resource name of the bucket, mirrors the ID of the // underlying Google Cloud Storage bucket, -// `projects/{project_number}/buckets/{bucket_id}`. +// `projects/{project_id_or_number}/buckets/{bucket_id}`. func (r *ProjectsBucketsService) AddFirebase(bucket string, addfirebaserequest *AddFirebaseRequest) *ProjectsBucketsAddFirebaseCall { c := &ProjectsBucketsAddFirebaseCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.bucket = bucket @@ -508,7 +508,7 @@ func (c *ProjectsBucketsAddFirebaseCall) Do(opts ...googleapi.CallOption) (*Buck // ], // "parameters": { // "bucket": { - // "description": "Required. Resource name of the bucket, mirrors the ID of the underlying Google Cloud Storage bucket, `projects/{project_number}/buckets/{bucket_id}`.", + // "description": "Required. Resource name of the bucket, mirrors the ID of the underlying Google Cloud Storage bucket, `projects/{project_id_or_number}/buckets/{bucket_id}`.", // "location": "path", // "pattern": "^projects/[^/]+/buckets/[^/]+$", // "required": true, @@ -545,7 +545,7 @@ type ProjectsBucketsGetCall struct { // // - name: Resource name of the bucket, mirrors the ID of the underlying // Google Cloud Storage bucket, -// `projects/{project_number}/buckets/{bucket_id}`. +// `projects/{project_id_or_number}/buckets/{bucket_id}`. func (r *ProjectsBucketsService) Get(name string) *ProjectsBucketsGetCall { c := &ProjectsBucketsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name @@ -660,7 +660,7 @@ func (c *ProjectsBucketsGetCall) Do(opts ...googleapi.CallOption) (*Bucket, erro // ], // "parameters": { // "name": { - // "description": "Required. Resource name of the bucket, mirrors the ID of the underlying Google Cloud Storage bucket, `projects/{project_number}/buckets/{bucket_id}`.", + // "description": "Required. Resource name of the bucket, mirrors the ID of the underlying Google Cloud Storage bucket, `projects/{project_id_or_number}/buckets/{bucket_id}`.", // "location": "path", // "pattern": "^projects/[^/]+/buckets/[^/]+$", // "required": true, @@ -693,7 +693,7 @@ type ProjectsBucketsListCall struct { // List: Lists the linked storage buckets for a project. // // - parent: Resource name of the parent Firebase project, -// `projects/{project_number}`. +// `projects/{project_id_or_number}`. func (r *ProjectsBucketsService) List(parent string) *ProjectsBucketsListCall { c := &ProjectsBucketsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.parent = parent @@ -836,7 +836,7 @@ func (c *ProjectsBucketsListCall) Do(opts ...googleapi.CallOption) (*ListBuckets // "type": "string" // }, // "parent": { - // "description": "Required. Resource name of the parent Firebase project, `projects/{project_number}`.", + // "description": "Required. Resource name of the parent Firebase project, `projects/{project_id_or_number}`.", // "location": "path", // "pattern": "^projects/[^/]+$", // "required": true, @@ -892,7 +892,7 @@ type ProjectsBucketsRemoveFirebaseCall struct { // // - bucket: Resource name of the bucket, mirrors the ID of the // underlying Google Cloud Storage bucket, -// `projects/{project_number}/buckets/{bucket_id}`. +// `projects/{project_id_or_number}/buckets/{bucket_id}`. func (r *ProjectsBucketsService) RemoveFirebase(bucket string, removefirebaserequest *RemoveFirebaseRequest) *ProjectsBucketsRemoveFirebaseCall { c := &ProjectsBucketsRemoveFirebaseCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.bucket = bucket @@ -1000,7 +1000,7 @@ func (c *ProjectsBucketsRemoveFirebaseCall) Do(opts ...googleapi.CallOption) (*E // ], // "parameters": { // "bucket": { - // "description": "Required. Resource name of the bucket, mirrors the ID of the underlying Google Cloud Storage bucket, `projects/{project_number}/buckets/{bucket_id}`.", + // "description": "Required. Resource name of the bucket, mirrors the ID of the underlying Google Cloud Storage bucket, `projects/{project_id_or_number}/buckets/{bucket_id}`.", // "location": "path", // "pattern": "^projects/[^/]+/buckets/[^/]+$", // "required": true, diff --git a/lifesciences/v2beta/lifesciences-api.json b/lifesciences/v2beta/lifesciences-api.json index 1b828072729..1b6e96157ee 100644 --- a/lifesciences/v2beta/lifesciences-api.json +++ b/lifesciences/v2beta/lifesciences-api.json @@ -312,7 +312,7 @@ } } }, - "revision": "20220916", + "revision": "20230504", "rootUrl": "https://lifesciences.googleapis.com/", "schemas": { "Accelerator": { @@ -703,7 +703,7 @@ "type": "object" }, "Location": { - "description": "A resource that represents Google Cloud Platform location.", + "description": "A resource that represents a Google Cloud location.", "id": "Location", "properties": { "displayName": { diff --git a/lifesciences/v2beta/lifesciences-gen.go b/lifesciences/v2beta/lifesciences-gen.go index 24c37aee8ba..a627a5672ea 100644 --- a/lifesciences/v2beta/lifesciences-gen.go +++ b/lifesciences/v2beta/lifesciences-gen.go @@ -915,7 +915,7 @@ func (s *ListOperationsResponse) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// Location: A resource that represents Google Cloud Platform location. +// Location: A resource that represents a Google Cloud location. type Location struct { // DisplayName: The friendly name for this location, typically a nearby // city name. For example, "Tokyo". diff --git a/monitoring/v3/monitoring-api.json b/monitoring/v3/monitoring-api.json index 0ab17b68652..8741b4d7d1f 100644 --- a/monitoring/v3/monitoring-api.json +++ b/monitoring/v3/monitoring-api.json @@ -2714,7 +2714,7 @@ } } }, - "revision": "20230507", + "revision": "20230518", "rootUrl": "https://monitoring.googleapis.com/", "schemas": { "Aggregation": { @@ -2843,7 +2843,7 @@ "type": "string" }, "conditions": { - "description": "A list of conditions for the policy. The conditions are combined by AND or OR according to the combiner field. If the combined conditions evaluate to true, then an incident is created. A policy can have from one to six conditions. If condition_time_series_query_language is present, it must be the only condition.", + "description": "A list of conditions for the policy. The conditions are combined by AND or OR according to the combiner field. If the combined conditions evaluate to true, then an incident is created. A policy can have from one to six conditions. If condition_time_series_query_language is present, it must be the only condition. If condition_monitoring_query_language is present, it must be the only condition.", "items": { "$ref": "Condition" }, diff --git a/monitoring/v3/monitoring-gen.go b/monitoring/v3/monitoring-gen.go index 2d7ae98f97c..8ab971dfbb8 100644 --- a/monitoring/v3/monitoring-gen.go +++ b/monitoring/v3/monitoring-gen.go @@ -689,7 +689,8 @@ type AlertPolicy struct { // combined conditions evaluate to true, then an incident is created. A // policy can have from one to six conditions. If // condition_time_series_query_language is present, it must be the only - // condition. + // condition. If condition_monitoring_query_language is present, it must + // be the only condition. Conditions []*Condition `json:"conditions,omitempty"` // CreationRecord: A read-only record of the creation of the alerting diff --git a/networksecurity/v1/networksecurity-api.json b/networksecurity/v1/networksecurity-api.json index ea8b714cd85..cda6507f71b 100644 --- a/networksecurity/v1/networksecurity-api.json +++ b/networksecurity/v1/networksecurity-api.json @@ -105,6 +105,429 @@ }, "protocol": "rest", "resources": { + "organizations": { + "resources": { + "locations": { + "resources": { + "addressGroups": { + "methods": { + "addItems": { + "description": "Adds items to an address group.", + "flatPath": "v1/organizations/{organizationsId}/locations/{locationsId}/addressGroups/{addressGroupsId}:addItems", + "httpMethod": "POST", + "id": "networksecurity.organizations.locations.addressGroups.addItems", + "parameterOrder": [ + "addressGroup" + ], + "parameters": { + "addressGroup": { + "description": "Required. A name of the AddressGroup to add items to. Must be in the format `projects|organization/*/locations/{location}/addressGroups/*`.", + "location": "path", + "pattern": "^organizations/[^/]+/locations/[^/]+/addressGroups/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1/{+addressGroup}:addItems", + "request": { + "$ref": "AddAddressGroupItemsRequest" + }, + "response": { + "$ref": "Operation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "cloneItems": { + "description": "Clones items from one address group to another.", + "flatPath": "v1/organizations/{organizationsId}/locations/{locationsId}/addressGroups/{addressGroupsId}:cloneItems", + "httpMethod": "POST", + "id": "networksecurity.organizations.locations.addressGroups.cloneItems", + "parameterOrder": [ + "addressGroup" + ], + "parameters": { + "addressGroup": { + "description": "Required. A name of the AddressGroup to clone items to. Must be in the format `projects|organization/*/locations/{location}/addressGroups/*`.", + "location": "path", + "pattern": "^organizations/[^/]+/locations/[^/]+/addressGroups/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1/{+addressGroup}:cloneItems", + "request": { + "$ref": "CloneAddressGroupItemsRequest" + }, + "response": { + "$ref": "Operation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "create": { + "description": "Creates a new address group in a given project and location.", + "flatPath": "v1/organizations/{organizationsId}/locations/{locationsId}/addressGroups", + "httpMethod": "POST", + "id": "networksecurity.organizations.locations.addressGroups.create", + "parameterOrder": [ + "parent" + ], + "parameters": { + "addressGroupId": { + "description": "Required. Short name of the AddressGroup resource to be created. This value should be 1-63 characters long, containing only letters, numbers, hyphens, and underscores, and should not start with a number. E.g. \"authz_policy\".", + "location": "query", + "type": "string" + }, + "parent": { + "description": "Required. The parent resource of the AddressGroup. Must be in the format `projects/*/locations/{location}`.", + "location": "path", + "pattern": "^organizations/[^/]+/locations/[^/]+$", + "required": true, + "type": "string" + }, + "requestId": { + "description": "Optional. An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. The server will guarantee that for at least 60 minutes since the first request. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", + "location": "query", + "type": "string" + } + }, + "path": "v1/{+parent}/addressGroups", + "request": { + "$ref": "AddressGroup" + }, + "response": { + "$ref": "Operation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "delete": { + "description": "Deletes an address group.", + "flatPath": "v1/organizations/{organizationsId}/locations/{locationsId}/addressGroups/{addressGroupsId}", + "httpMethod": "DELETE", + "id": "networksecurity.organizations.locations.addressGroups.delete", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Required. A name of the AddressGroup to delete. Must be in the format `projects/*/locations/{location}/addressGroups/*`.", + "location": "path", + "pattern": "^organizations/[^/]+/locations/[^/]+/addressGroups/[^/]+$", + "required": true, + "type": "string" + }, + "requestId": { + "description": "Optional. An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. The server will guarantee that for at least 60 minutes since the first request. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", + "location": "query", + "type": "string" + } + }, + "path": "v1/{+name}", + "response": { + "$ref": "Operation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "get": { + "description": "Gets details of a single address group.", + "flatPath": "v1/organizations/{organizationsId}/locations/{locationsId}/addressGroups/{addressGroupsId}", + "httpMethod": "GET", + "id": "networksecurity.organizations.locations.addressGroups.get", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Required. A name of the AddressGroup to get. Must be in the format `projects/*/locations/{location}/addressGroups/*`.", + "location": "path", + "pattern": "^organizations/[^/]+/locations/[^/]+/addressGroups/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1/{+name}", + "response": { + "$ref": "AddressGroup" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "list": { + "description": "Lists address groups in a given project and location.", + "flatPath": "v1/organizations/{organizationsId}/locations/{locationsId}/addressGroups", + "httpMethod": "GET", + "id": "networksecurity.organizations.locations.addressGroups.list", + "parameterOrder": [ + "parent" + ], + "parameters": { + "pageSize": { + "description": "Maximum number of AddressGroups to return per call.", + "format": "int32", + "location": "query", + "type": "integer" + }, + "pageToken": { + "description": "The value returned by the last `ListAddressGroupsResponse` Indicates that this is a continuation of a prior `ListAddressGroups` call, and that the system should return the next page of data.", + "location": "query", + "type": "string" + }, + "parent": { + "description": "Required. The project and location from which the AddressGroups should be listed, specified in the format `projects/*/locations/{location}`.", + "location": "path", + "pattern": "^organizations/[^/]+/locations/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1/{+parent}/addressGroups", + "response": { + "$ref": "ListAddressGroupsResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "listReferences": { + "description": "Lists references of an address group.", + "flatPath": "v1/organizations/{organizationsId}/locations/{locationsId}/addressGroups/{addressGroupsId}:listReferences", + "httpMethod": "GET", + "id": "networksecurity.organizations.locations.addressGroups.listReferences", + "parameterOrder": [ + "addressGroup" + ], + "parameters": { + "addressGroup": { + "description": "Required. A name of the AddressGroup to clone items to. Must be in the format `projects|organization/*/locations/{location}/addressGroups/*`.", + "location": "path", + "pattern": "^organizations/[^/]+/locations/[^/]+/addressGroups/[^/]+$", + "required": true, + "type": "string" + }, + "pageSize": { + "description": "The maximum number of references to return. If unspecified, server will pick an appropriate default. Server may return fewer items than requested. A caller should only rely on response's next_page_token to determine if there are more AddressGroupUsers left to be queried.", + "format": "int32", + "location": "query", + "type": "integer" + }, + "pageToken": { + "description": "The next_page_token value returned from a previous List request, if any.", + "location": "query", + "type": "string" + } + }, + "path": "v1/{+addressGroup}:listReferences", + "response": { + "$ref": "ListAddressGroupReferencesResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "patch": { + "description": "Updates parameters of an address group.", + "flatPath": "v1/organizations/{organizationsId}/locations/{locationsId}/addressGroups/{addressGroupsId}", + "httpMethod": "PATCH", + "id": "networksecurity.organizations.locations.addressGroups.patch", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Required. Name of the AddressGroup resource. It matches pattern `projects/*/locations/{location}/addressGroups/`.", + "location": "path", + "pattern": "^organizations/[^/]+/locations/[^/]+/addressGroups/[^/]+$", + "required": true, + "type": "string" + }, + "requestId": { + "description": "Optional. An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. The server will guarantee that for at least 60 minutes since the first request. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", + "location": "query", + "type": "string" + }, + "updateMask": { + "description": "Optional. Field mask is used to specify the fields to be overwritten in the AddressGroup resource by the update. The fields specified in the update_mask are relative to the resource, not the full request. A field will be overwritten if it is in the mask. If the user does not provide a mask then all fields will be overwritten.", + "format": "google-fieldmask", + "location": "query", + "type": "string" + } + }, + "path": "v1/{+name}", + "request": { + "$ref": "AddressGroup" + }, + "response": { + "$ref": "Operation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "removeItems": { + "description": "Removes items from an address group.", + "flatPath": "v1/organizations/{organizationsId}/locations/{locationsId}/addressGroups/{addressGroupsId}:removeItems", + "httpMethod": "POST", + "id": "networksecurity.organizations.locations.addressGroups.removeItems", + "parameterOrder": [ + "addressGroup" + ], + "parameters": { + "addressGroup": { + "description": "Required. A name of the AddressGroup to remove items from. Must be in the format `projects|organization/*/locations/{location}/addressGroups/*`.", + "location": "path", + "pattern": "^organizations/[^/]+/locations/[^/]+/addressGroups/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1/{+addressGroup}:removeItems", + "request": { + "$ref": "RemoveAddressGroupItemsRequest" + }, + "response": { + "$ref": "Operation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + } + } + }, + "operations": { + "methods": { + "cancel": { + "description": "Starts asynchronous cancellation on a long-running operation. The server makes a best effort to cancel the operation, but success is not guaranteed. If the server doesn't support this method, it returns `google.rpc.Code.UNIMPLEMENTED`. Clients can use Operations.GetOperation or other methods to check whether the cancellation succeeded or whether the operation completed despite cancellation. On successful cancellation, the operation is not deleted; instead, it becomes an operation with an Operation.error value with a google.rpc.Status.code of 1, corresponding to `Code.CANCELLED`.", + "flatPath": "v1/organizations/{organizationsId}/locations/{locationsId}/operations/{operationsId}:cancel", + "httpMethod": "POST", + "id": "networksecurity.organizations.locations.operations.cancel", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "The name of the operation resource to be cancelled.", + "location": "path", + "pattern": "^organizations/[^/]+/locations/[^/]+/operations/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1/{+name}:cancel", + "request": { + "$ref": "CancelOperationRequest" + }, + "response": { + "$ref": "Empty" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "delete": { + "description": "Deletes a long-running operation. This method indicates that the client is no longer interested in the operation result. It does not cancel the operation. If the server doesn't support this method, it returns `google.rpc.Code.UNIMPLEMENTED`.", + "flatPath": "v1/organizations/{organizationsId}/locations/{locationsId}/operations/{operationsId}", + "httpMethod": "DELETE", + "id": "networksecurity.organizations.locations.operations.delete", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "The name of the operation resource to be deleted.", + "location": "path", + "pattern": "^organizations/[^/]+/locations/[^/]+/operations/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1/{+name}", + "response": { + "$ref": "Empty" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "get": { + "description": "Gets the latest state of a long-running operation. Clients can use this method to poll the operation result at intervals as recommended by the API service.", + "flatPath": "v1/organizations/{organizationsId}/locations/{locationsId}/operations/{operationsId}", + "httpMethod": "GET", + "id": "networksecurity.organizations.locations.operations.get", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "The name of the operation resource.", + "location": "path", + "pattern": "^organizations/[^/]+/locations/[^/]+/operations/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1/{+name}", + "response": { + "$ref": "Operation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "list": { + "description": "Lists operations that match the specified filter in the request. If the server doesn't support this method, it returns `UNIMPLEMENTED`.", + "flatPath": "v1/organizations/{organizationsId}/locations/{locationsId}/operations", + "httpMethod": "GET", + "id": "networksecurity.organizations.locations.operations.list", + "parameterOrder": [ + "name" + ], + "parameters": { + "filter": { + "description": "The standard list filter.", + "location": "query", + "type": "string" + }, + "name": { + "description": "The name of the operation's parent resource.", + "location": "path", + "pattern": "^organizations/[^/]+/locations/[^/]+$", + "required": true, + "type": "string" + }, + "pageSize": { + "description": "The standard list page size.", + "format": "int32", + "location": "query", + "type": "integer" + }, + "pageToken": { + "description": "The standard list page token.", + "location": "query", + "type": "string" + } + }, + "path": "v1/{+name}/operations", + "response": { + "$ref": "ListOperationsResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + } + } + } + } + } + } + }, "projects": { "resources": { "locations": { @@ -148,35 +571,414 @@ "location": "query", "type": "string" }, - "name": { - "description": "The resource that owns the locations collection, if applicable.", - "location": "path", - "pattern": "^projects/[^/]+$", - "required": true, - "type": "string" + "name": { + "description": "The resource that owns the locations collection, if applicable.", + "location": "path", + "pattern": "^projects/[^/]+$", + "required": true, + "type": "string" + }, + "pageSize": { + "description": "The maximum number of results to return. If not set, the service selects a default.", + "format": "int32", + "location": "query", + "type": "integer" + }, + "pageToken": { + "description": "A page token received from the `next_page_token` field in the response. Send that page token to receive the subsequent page.", + "location": "query", + "type": "string" + } + }, + "path": "v1/{+name}/locations", + "response": { + "$ref": "ListLocationsResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + } + }, + "resources": { + "addressGroups": { + "methods": { + "addItems": { + "description": "Adds items to an address group.", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/addressGroups/{addressGroupsId}:addItems", + "httpMethod": "POST", + "id": "networksecurity.projects.locations.addressGroups.addItems", + "parameterOrder": [ + "addressGroup" + ], + "parameters": { + "addressGroup": { + "description": "Required. A name of the AddressGroup to add items to. Must be in the format `projects|organization/*/locations/{location}/addressGroups/*`.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/addressGroups/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1/{+addressGroup}:addItems", + "request": { + "$ref": "AddAddressGroupItemsRequest" + }, + "response": { + "$ref": "Operation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "cloneItems": { + "description": "Clones items from one address group to another.", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/addressGroups/{addressGroupsId}:cloneItems", + "httpMethod": "POST", + "id": "networksecurity.projects.locations.addressGroups.cloneItems", + "parameterOrder": [ + "addressGroup" + ], + "parameters": { + "addressGroup": { + "description": "Required. A name of the AddressGroup to clone items to. Must be in the format `projects|organization/*/locations/{location}/addressGroups/*`.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/addressGroups/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1/{+addressGroup}:cloneItems", + "request": { + "$ref": "CloneAddressGroupItemsRequest" + }, + "response": { + "$ref": "Operation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "create": { + "description": "Creates a new address group in a given project and location.", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/addressGroups", + "httpMethod": "POST", + "id": "networksecurity.projects.locations.addressGroups.create", + "parameterOrder": [ + "parent" + ], + "parameters": { + "addressGroupId": { + "description": "Required. Short name of the AddressGroup resource to be created. This value should be 1-63 characters long, containing only letters, numbers, hyphens, and underscores, and should not start with a number. E.g. \"authz_policy\".", + "location": "query", + "type": "string" + }, + "parent": { + "description": "Required. The parent resource of the AddressGroup. Must be in the format `projects/*/locations/{location}`.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+$", + "required": true, + "type": "string" + }, + "requestId": { + "description": "Optional. An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. The server will guarantee that for at least 60 minutes since the first request. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", + "location": "query", + "type": "string" + } + }, + "path": "v1/{+parent}/addressGroups", + "request": { + "$ref": "AddressGroup" + }, + "response": { + "$ref": "Operation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "delete": { + "description": "Deletes a single address group.", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/addressGroups/{addressGroupsId}", + "httpMethod": "DELETE", + "id": "networksecurity.projects.locations.addressGroups.delete", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Required. A name of the AddressGroup to delete. Must be in the format `projects/*/locations/{location}/addressGroups/*`.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/addressGroups/[^/]+$", + "required": true, + "type": "string" + }, + "requestId": { + "description": "Optional. An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. The server will guarantee that for at least 60 minutes since the first request. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", + "location": "query", + "type": "string" + } + }, + "path": "v1/{+name}", + "response": { + "$ref": "Operation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "get": { + "description": "Gets details of a single address group.", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/addressGroups/{addressGroupsId}", + "httpMethod": "GET", + "id": "networksecurity.projects.locations.addressGroups.get", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Required. A name of the AddressGroup to get. Must be in the format `projects/*/locations/{location}/addressGroups/*`.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/addressGroups/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1/{+name}", + "response": { + "$ref": "AddressGroup" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "getIamPolicy": { + "description": "Gets the access control policy for a resource. Returns an empty policy if the resource exists and does not have a policy set.", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/addressGroups/{addressGroupsId}:getIamPolicy", + "httpMethod": "GET", + "id": "networksecurity.projects.locations.addressGroups.getIamPolicy", + "parameterOrder": [ + "resource" + ], + "parameters": { + "options.requestedPolicyVersion": { + "description": "Optional. The maximum policy version that will be used to format the policy. Valid values are 0, 1, and 3. Requests specifying an invalid value will be rejected. Requests for policies with any conditional role bindings must specify version 3. Policies with no conditional role bindings may specify any valid value or leave the field unset. The policy in the response might use the policy version that you specified, or it might use a lower policy version. For example, if you specify version 3, but the policy has no conditional role bindings, the response uses version 1. To learn which resources support conditions in their IAM policies, see the [IAM documentation](https://cloud.google.com/iam/help/conditions/resource-policies).", + "format": "int32", + "location": "query", + "type": "integer" + }, + "resource": { + "description": "REQUIRED: The resource for which the policy is being requested. See [Resource names](https://cloud.google.com/apis/design/resource_names) for the appropriate value for this field.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/addressGroups/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1/{+resource}:getIamPolicy", + "response": { + "$ref": "GoogleIamV1Policy" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "list": { + "description": "Lists address groups in a given project and location.", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/addressGroups", + "httpMethod": "GET", + "id": "networksecurity.projects.locations.addressGroups.list", + "parameterOrder": [ + "parent" + ], + "parameters": { + "pageSize": { + "description": "Maximum number of AddressGroups to return per call.", + "format": "int32", + "location": "query", + "type": "integer" + }, + "pageToken": { + "description": "The value returned by the last `ListAddressGroupsResponse` Indicates that this is a continuation of a prior `ListAddressGroups` call, and that the system should return the next page of data.", + "location": "query", + "type": "string" + }, + "parent": { + "description": "Required. The project and location from which the AddressGroups should be listed, specified in the format `projects/*/locations/{location}`.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1/{+parent}/addressGroups", + "response": { + "$ref": "ListAddressGroupsResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "listReferences": { + "description": "Lists references of an address group.", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/addressGroups/{addressGroupsId}:listReferences", + "httpMethod": "GET", + "id": "networksecurity.projects.locations.addressGroups.listReferences", + "parameterOrder": [ + "addressGroup" + ], + "parameters": { + "addressGroup": { + "description": "Required. A name of the AddressGroup to clone items to. Must be in the format `projects|organization/*/locations/{location}/addressGroups/*`.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/addressGroups/[^/]+$", + "required": true, + "type": "string" + }, + "pageSize": { + "description": "The maximum number of references to return. If unspecified, server will pick an appropriate default. Server may return fewer items than requested. A caller should only rely on response's next_page_token to determine if there are more AddressGroupUsers left to be queried.", + "format": "int32", + "location": "query", + "type": "integer" + }, + "pageToken": { + "description": "The next_page_token value returned from a previous List request, if any.", + "location": "query", + "type": "string" + } + }, + "path": "v1/{+addressGroup}:listReferences", + "response": { + "$ref": "ListAddressGroupReferencesResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "patch": { + "description": "Updates the parameters of a single address group.", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/addressGroups/{addressGroupsId}", + "httpMethod": "PATCH", + "id": "networksecurity.projects.locations.addressGroups.patch", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Required. Name of the AddressGroup resource. It matches pattern `projects/*/locations/{location}/addressGroups/`.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/addressGroups/[^/]+$", + "required": true, + "type": "string" + }, + "requestId": { + "description": "Optional. An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. The server will guarantee that for at least 60 minutes since the first request. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", + "location": "query", + "type": "string" + }, + "updateMask": { + "description": "Optional. Field mask is used to specify the fields to be overwritten in the AddressGroup resource by the update. The fields specified in the update_mask are relative to the resource, not the full request. A field will be overwritten if it is in the mask. If the user does not provide a mask then all fields will be overwritten.", + "format": "google-fieldmask", + "location": "query", + "type": "string" + } + }, + "path": "v1/{+name}", + "request": { + "$ref": "AddressGroup" + }, + "response": { + "$ref": "Operation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] }, - "pageSize": { - "description": "The maximum number of results to return. If not set, the service selects a default.", - "format": "int32", - "location": "query", - "type": "integer" + "removeItems": { + "description": "Removes items from an address group.", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/addressGroups/{addressGroupsId}:removeItems", + "httpMethod": "POST", + "id": "networksecurity.projects.locations.addressGroups.removeItems", + "parameterOrder": [ + "addressGroup" + ], + "parameters": { + "addressGroup": { + "description": "Required. A name of the AddressGroup to remove items from. Must be in the format `projects|organization/*/locations/{location}/addressGroups/*`.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/addressGroups/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1/{+addressGroup}:removeItems", + "request": { + "$ref": "RemoveAddressGroupItemsRequest" + }, + "response": { + "$ref": "Operation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] }, - "pageToken": { - "description": "A page token received from the `next_page_token` field in the response. Send that page token to receive the subsequent page.", - "location": "query", - "type": "string" + "setIamPolicy": { + "description": "Sets the access control policy on the specified resource. Replaces any existing policy. Can return `NOT_FOUND`, `INVALID_ARGUMENT`, and `PERMISSION_DENIED` errors.", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/addressGroups/{addressGroupsId}:setIamPolicy", + "httpMethod": "POST", + "id": "networksecurity.projects.locations.addressGroups.setIamPolicy", + "parameterOrder": [ + "resource" + ], + "parameters": { + "resource": { + "description": "REQUIRED: The resource for which the policy is being specified. See [Resource names](https://cloud.google.com/apis/design/resource_names) for the appropriate value for this field.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/addressGroups/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1/{+resource}:setIamPolicy", + "request": { + "$ref": "GoogleIamV1SetIamPolicyRequest" + }, + "response": { + "$ref": "GoogleIamV1Policy" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "testIamPermissions": { + "description": "Returns permissions that a caller has on the specified resource. If the resource does not exist, this will return an empty set of permissions, not a `NOT_FOUND` error. Note: This operation is designed to be used for building permission-aware UIs and command-line tools, not for authorization checking. This operation may \"fail open\" without warning.", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/addressGroups/{addressGroupsId}:testIamPermissions", + "httpMethod": "POST", + "id": "networksecurity.projects.locations.addressGroups.testIamPermissions", + "parameterOrder": [ + "resource" + ], + "parameters": { + "resource": { + "description": "REQUIRED: The resource for which the policy detail is being requested. See [Resource names](https://cloud.google.com/apis/design/resource_names) for the appropriate value for this field.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/addressGroups/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1/{+resource}:testIamPermissions", + "request": { + "$ref": "GoogleIamV1TestIamPermissionsRequest" + }, + "response": { + "$ref": "GoogleIamV1TestIamPermissionsResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] } - }, - "path": "v1/{+name}/locations", - "response": { - "$ref": "ListLocationsResponse" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ] - } - }, - "resources": { + } + }, "authorizationPolicies": { "methods": { "create": { @@ -1672,9 +2474,92 @@ } } }, - "revision": "20230420", + "revision": "20230511", "rootUrl": "https://networksecurity.googleapis.com/", "schemas": { + "AddAddressGroupItemsRequest": { + "description": "Request used by the AddAddressGroupItems method.", + "id": "AddAddressGroupItemsRequest", + "properties": { + "items": { + "description": "Required. List of items to add.", + "items": { + "type": "string" + }, + "type": "array" + }, + "requestId": { + "description": "Optional. An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. The server will guarantee that for at least 60 minutes since the first request. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", + "type": "string" + } + }, + "type": "object" + }, + "AddressGroup": { + "description": "AddressGroup is a resource that specifies how a collection of IP/DNS used in Firewall Policy.", + "id": "AddressGroup", + "properties": { + "capacity": { + "description": "Required. Capacity of the Address Group", + "format": "int32", + "type": "integer" + }, + "createTime": { + "description": "Output only. The timestamp when the resource was created.", + "format": "google-datetime", + "readOnly": true, + "type": "string" + }, + "description": { + "description": "Optional. Free-text description of the resource.", + "type": "string" + }, + "items": { + "description": "Optional. List of items.", + "items": { + "type": "string" + }, + "type": "array" + }, + "labels": { + "additionalProperties": { + "type": "string" + }, + "description": "Optional. Set of label tags associated with the AddressGroup resource.", + "type": "object" + }, + "name": { + "description": "Required. Name of the AddressGroup resource. It matches pattern `projects/*/locations/{location}/addressGroups/`.", + "type": "string" + }, + "selfLink": { + "description": "Output only. Server-defined fully-qualified URL for this resource.", + "readOnly": true, + "type": "string" + }, + "type": { + "description": "Required. The type of the Address Group. Possible values are \"IPv4\" or \"IPV6\".", + "enum": [ + "TYPE_UNSPECIFIED", + "IPV4", + "IPV6" + ], + "enumDescriptions": [ + "Default value.", + "IP v4 ranges.", + "IP v6 ranges." + ], + "type": "string" + }, + "updateTime": { + "description": "Output only. The timestamp when the resource was updated.", + "format": "google-datetime", + "readOnly": true, + "type": "string" + } + }, + "type": "object" + }, "AuthorizationPolicy": { "description": "AuthorizationPolicy is a resource that specifies how a server should authorize incoming connections. This resource in itself does not change the configuration unless it's attached to a target https proxy or endpoint config selector resource.", "id": "AuthorizationPolicy", @@ -1796,6 +2681,21 @@ }, "type": "object" }, + "CloneAddressGroupItemsRequest": { + "description": "Request used by the CloneAddressGroupItems method.", + "id": "CloneAddressGroupItemsRequest", + "properties": { + "requestId": { + "description": "Optional. An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. The server will guarantee that for at least 60 minutes since the first request. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", + "type": "string" + }, + "sourceAddressGroup": { + "description": "Required. Source address group to clone items from.", + "type": "string" + } + }, + "type": "object" + }, "Destination": { "description": "Specification of traffic destination attributes.", "id": "Destination", @@ -2137,6 +3037,58 @@ }, "type": "object" }, + "ListAddressGroupReferencesResponse": { + "description": "Response of the ListAddressGroupReferences method.", + "id": "ListAddressGroupReferencesResponse", + "properties": { + "addressGroupReferences": { + "description": "A list of references that matches the specified filter in the request.", + "items": { + "$ref": "ListAddressGroupReferencesResponseAddressGroupReference" + }, + "type": "array" + }, + "nextPageToken": { + "description": "If there might be more results than those appearing in this response, then `next_page_token` is included. To get the next set of results, call this method again using the value of `next_page_token` as `page_token`.", + "type": "string" + } + }, + "type": "object" + }, + "ListAddressGroupReferencesResponseAddressGroupReference": { + "description": "The Reference of AddressGroup.", + "id": "ListAddressGroupReferencesResponseAddressGroupReference", + "properties": { + "firewallPolicy": { + "description": "FirewallPolicy that is using the Address Group.", + "type": "string" + }, + "rulePriority": { + "description": "Rule priority of the FirewallPolicy that is using the Address Group.", + "format": "int32", + "type": "integer" + } + }, + "type": "object" + }, + "ListAddressGroupsResponse": { + "description": "Response returned by the ListAddressGroups method.", + "id": "ListAddressGroupsResponse", + "properties": { + "addressGroups": { + "description": "List of AddressGroups resources.", + "items": { + "$ref": "AddressGroup" + }, + "type": "array" + }, + "nextPageToken": { + "description": "If there might be more results than those appearing in this response, then `next_page_token` is included. To get the next set of results, call this method again using the value of `next_page_token` as `page_token`.", + "type": "string" + } + }, + "type": "object" + }, "ListAuthorizationPoliciesResponse": { "description": "Response returned by the ListAuthorizationPolicies method.", "id": "ListAuthorizationPoliciesResponse", @@ -2472,6 +3424,24 @@ }, "type": "object" }, + "RemoveAddressGroupItemsRequest": { + "description": "Request used by the RemoveAddressGroupItems method.", + "id": "RemoveAddressGroupItemsRequest", + "properties": { + "items": { + "description": "Required. List of items to remove.", + "items": { + "type": "string" + }, + "type": "array" + }, + "requestId": { + "description": "Optional. An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. The server will guarantee that for at least 60 minutes since the first request. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", + "type": "string" + } + }, + "type": "object" + }, "Rule": { "description": "Specification of rules.", "id": "Rule", diff --git a/networksecurity/v1/networksecurity-gen.go b/networksecurity/v1/networksecurity-gen.go index b12d89ce3a0..c45445734c5 100644 --- a/networksecurity/v1/networksecurity-gen.go +++ b/networksecurity/v1/networksecurity-gen.go @@ -119,6 +119,7 @@ func New(client *http.Client) (*Service, error) { return nil, errors.New("client is nil") } s := &Service{client: client, BasePath: basePath} + s.Organizations = NewOrganizationsService(s) s.Projects = NewProjectsService(s) return s, nil } @@ -128,6 +129,8 @@ type Service struct { BasePath string // API endpoint base URL UserAgent string // optional additional User-Agent fragment + Organizations *OrganizationsService + Projects *ProjectsService } @@ -138,6 +141,51 @@ func (s *Service) userAgent() string { return googleapi.UserAgent + " " + s.UserAgent } +func NewOrganizationsService(s *Service) *OrganizationsService { + rs := &OrganizationsService{s: s} + rs.Locations = NewOrganizationsLocationsService(s) + return rs +} + +type OrganizationsService struct { + s *Service + + Locations *OrganizationsLocationsService +} + +func NewOrganizationsLocationsService(s *Service) *OrganizationsLocationsService { + rs := &OrganizationsLocationsService{s: s} + rs.AddressGroups = NewOrganizationsLocationsAddressGroupsService(s) + rs.Operations = NewOrganizationsLocationsOperationsService(s) + return rs +} + +type OrganizationsLocationsService struct { + s *Service + + AddressGroups *OrganizationsLocationsAddressGroupsService + + Operations *OrganizationsLocationsOperationsService +} + +func NewOrganizationsLocationsAddressGroupsService(s *Service) *OrganizationsLocationsAddressGroupsService { + rs := &OrganizationsLocationsAddressGroupsService{s: s} + return rs +} + +type OrganizationsLocationsAddressGroupsService struct { + s *Service +} + +func NewOrganizationsLocationsOperationsService(s *Service) *OrganizationsLocationsOperationsService { + rs := &OrganizationsLocationsOperationsService{s: s} + return rs +} + +type OrganizationsLocationsOperationsService struct { + s *Service +} + func NewProjectsService(s *Service) *ProjectsService { rs := &ProjectsService{s: s} rs.Locations = NewProjectsLocationsService(s) @@ -152,6 +200,7 @@ type ProjectsService struct { func NewProjectsLocationsService(s *Service) *ProjectsLocationsService { rs := &ProjectsLocationsService{s: s} + rs.AddressGroups = NewProjectsLocationsAddressGroupsService(s) rs.AuthorizationPolicies = NewProjectsLocationsAuthorizationPoliciesService(s) rs.ClientTlsPolicies = NewProjectsLocationsClientTlsPoliciesService(s) rs.GatewaySecurityPolicies = NewProjectsLocationsGatewaySecurityPoliciesService(s) @@ -165,6 +214,8 @@ func NewProjectsLocationsService(s *Service) *ProjectsLocationsService { type ProjectsLocationsService struct { s *Service + AddressGroups *ProjectsLocationsAddressGroupsService + AuthorizationPolicies *ProjectsLocationsAuthorizationPoliciesService ClientTlsPolicies *ProjectsLocationsClientTlsPoliciesService @@ -180,6 +231,15 @@ type ProjectsLocationsService struct { UrlLists *ProjectsLocationsUrlListsService } +func NewProjectsLocationsAddressGroupsService(s *Service) *ProjectsLocationsAddressGroupsService { + rs := &ProjectsLocationsAddressGroupsService{s: s} + return rs +} + +type ProjectsLocationsAddressGroupsService struct { + s *Service +} + func NewProjectsLocationsAuthorizationPoliciesService(s *Service) *ProjectsLocationsAuthorizationPoliciesService { rs := &ProjectsLocationsAuthorizationPoliciesService{s: s} return rs @@ -255,6 +315,115 @@ type ProjectsLocationsUrlListsService struct { s *Service } +// AddAddressGroupItemsRequest: Request used by the AddAddressGroupItems +// method. +type AddAddressGroupItemsRequest struct { + // Items: Required. List of items to add. + Items []string `json:"items,omitempty"` + + // RequestId: Optional. An optional request ID to identify requests. + // Specify a unique request ID so that if you must retry your request, + // the server will know to ignore the request if it has already been + // completed. The server will guarantee that for at least 60 minutes + // since the first request. For example, consider a situation where you + // make an initial request and the request times out. If you make the + // request again with the same request ID, the server can check if + // original operation with the same request ID was received, and if so, + // will ignore the second request. This prevents clients from + // accidentally creating duplicate commitments. The request ID must be a + // valid UUID with the exception that zero UUID is not supported + // (00000000-0000-0000-0000-000000000000). + RequestId string `json:"requestId,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Items") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Items") to include in API + // requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *AddAddressGroupItemsRequest) MarshalJSON() ([]byte, error) { + type NoMethod AddAddressGroupItemsRequest + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// AddressGroup: AddressGroup is a resource that specifies how a +// collection of IP/DNS used in Firewall Policy. +type AddressGroup struct { + // Capacity: Required. Capacity of the Address Group + Capacity int64 `json:"capacity,omitempty"` + + // CreateTime: Output only. The timestamp when the resource was created. + CreateTime string `json:"createTime,omitempty"` + + // Description: Optional. Free-text description of the resource. + Description string `json:"description,omitempty"` + + // Items: Optional. List of items. + Items []string `json:"items,omitempty"` + + // Labels: Optional. Set of label tags associated with the AddressGroup + // resource. + Labels map[string]string `json:"labels,omitempty"` + + // Name: Required. Name of the AddressGroup resource. It matches pattern + // `projects/*/locations/{location}/addressGroups/`. + Name string `json:"name,omitempty"` + + // SelfLink: Output only. Server-defined fully-qualified URL for this + // resource. + SelfLink string `json:"selfLink,omitempty"` + + // Type: Required. The type of the Address Group. Possible values are + // "IPv4" or "IPV6". + // + // Possible values: + // "TYPE_UNSPECIFIED" - Default value. + // "IPV4" - IP v4 ranges. + // "IPV6" - IP v6 ranges. + Type string `json:"type,omitempty"` + + // UpdateTime: Output only. The timestamp when the resource was updated. + UpdateTime string `json:"updateTime,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the + // server. + googleapi.ServerResponse `json:"-"` + + // ForceSendFields is a list of field names (e.g. "Capacity") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Capacity") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *AddressGroup) MarshalJSON() ([]byte, error) { + type NoMethod AddressGroup + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // AuthorizationPolicy: AuthorizationPolicy is a resource that specifies // how a server should authorize incoming connections. This resource in // itself does not change the configuration unless it's attached to a @@ -428,6 +597,50 @@ func (s *ClientTlsPolicy) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// CloneAddressGroupItemsRequest: Request used by the +// CloneAddressGroupItems method. +type CloneAddressGroupItemsRequest struct { + // RequestId: Optional. An optional request ID to identify requests. + // Specify a unique request ID so that if you must retry your request, + // the server will know to ignore the request if it has already been + // completed. The server will guarantee that for at least 60 minutes + // since the first request. For example, consider a situation where you + // make an initial request and the request times out. If you make the + // request again with the same request ID, the server can check if + // original operation with the same request ID was received, and if so, + // will ignore the second request. This prevents clients from + // accidentally creating duplicate commitments. The request ID must be a + // valid UUID with the exception that zero UUID is not supported + // (00000000-0000-0000-0000-000000000000). + RequestId string `json:"requestId,omitempty"` + + // SourceAddressGroup: Required. Source address group to clone items + // from. + SourceAddressGroup string `json:"sourceAddressGroup,omitempty"` + + // ForceSendFields is a list of field names (e.g. "RequestId") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "RequestId") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *CloneAddressGroupItemsRequest) MarshalJSON() ([]byte, error) { + type NoMethod CloneAddressGroupItemsRequest + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // Destination: Specification of traffic destination attributes. type Destination struct { // Hosts: Required. List of host names to match. Matched against the @@ -1172,6 +1385,121 @@ func (s *HttpHeaderMatch) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// ListAddressGroupReferencesResponse: Response of the +// ListAddressGroupReferences method. +type ListAddressGroupReferencesResponse struct { + // AddressGroupReferences: A list of references that matches the + // specified filter in the request. + AddressGroupReferences []*ListAddressGroupReferencesResponseAddressGroupReference `json:"addressGroupReferences,omitempty"` + + // NextPageToken: If there might be more results than those appearing in + // this response, then `next_page_token` is included. To get the next + // set of results, call this method again using the value of + // `next_page_token` as `page_token`. + NextPageToken string `json:"nextPageToken,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the + // server. + googleapi.ServerResponse `json:"-"` + + // ForceSendFields is a list of field names (e.g. + // "AddressGroupReferences") to unconditionally include in API requests. + // By default, fields with empty or default values are omitted from API + // requests. However, any non-pointer, non-interface field appearing in + // ForceSendFields will be sent to the server regardless of whether the + // field is empty or not. This may be used to include empty fields in + // Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "AddressGroupReferences") + // to include in API requests with the JSON null value. By default, + // fields with empty values are omitted from API requests. However, any + // field with an empty value appearing in NullFields will be sent to the + // server as null. It is an error if a field in this list has a + // non-empty value. This may be used to include null fields in Patch + // requests. + NullFields []string `json:"-"` +} + +func (s *ListAddressGroupReferencesResponse) MarshalJSON() ([]byte, error) { + type NoMethod ListAddressGroupReferencesResponse + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// ListAddressGroupReferencesResponseAddressGroupReference: The +// Reference of AddressGroup. +type ListAddressGroupReferencesResponseAddressGroupReference struct { + // FirewallPolicy: FirewallPolicy that is using the Address Group. + FirewallPolicy string `json:"firewallPolicy,omitempty"` + + // RulePriority: Rule priority of the FirewallPolicy that is using the + // Address Group. + RulePriority int64 `json:"rulePriority,omitempty"` + + // ForceSendFields is a list of field names (e.g. "FirewallPolicy") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "FirewallPolicy") to + // include in API requests with the JSON null value. By default, fields + // with empty values are omitted from API requests. However, any field + // with an empty value appearing in NullFields will be sent to the + // server as null. It is an error if a field in this list has a + // non-empty value. This may be used to include null fields in Patch + // requests. + NullFields []string `json:"-"` +} + +func (s *ListAddressGroupReferencesResponseAddressGroupReference) MarshalJSON() ([]byte, error) { + type NoMethod ListAddressGroupReferencesResponseAddressGroupReference + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// ListAddressGroupsResponse: Response returned by the ListAddressGroups +// method. +type ListAddressGroupsResponse struct { + // AddressGroups: List of AddressGroups resources. + AddressGroups []*AddressGroup `json:"addressGroups,omitempty"` + + // NextPageToken: If there might be more results than those appearing in + // this response, then `next_page_token` is included. To get the next + // set of results, call this method again using the value of + // `next_page_token` as `page_token`. + NextPageToken string `json:"nextPageToken,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the + // server. + googleapi.ServerResponse `json:"-"` + + // ForceSendFields is a list of field names (e.g. "AddressGroups") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "AddressGroups") to include + // in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. However, any field with + // an empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *ListAddressGroupsResponse) MarshalJSON() ([]byte, error) { + type NoMethod ListAddressGroupsResponse + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // ListAuthorizationPoliciesResponse: Response returned by the // ListAuthorizationPolicies method. type ListAuthorizationPoliciesResponse struct { @@ -1762,6 +2090,49 @@ func (s *OperationMetadata) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// RemoveAddressGroupItemsRequest: Request used by the +// RemoveAddressGroupItems method. +type RemoveAddressGroupItemsRequest struct { + // Items: Required. List of items to remove. + Items []string `json:"items,omitempty"` + + // RequestId: Optional. An optional request ID to identify requests. + // Specify a unique request ID so that if you must retry your request, + // the server will know to ignore the request if it has already been + // completed. The server will guarantee that for at least 60 minutes + // since the first request. For example, consider a situation where you + // make an initial request and the request times out. If you make the + // request again with the same request ID, the server can check if + // original operation with the same request ID was received, and if so, + // will ignore the second request. This prevents clients from + // accidentally creating duplicate commitments. The request ID must be a + // valid UUID with the exception that zero UUID is not supported + // (00000000-0000-0000-0000-000000000000). + RequestId string `json:"requestId,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Items") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Items") to include in API + // requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *RemoveAddressGroupItemsRequest) MarshalJSON() ([]byte, error) { + type NoMethod RemoveAddressGroupItemsRequest + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // Rule: Specification of rules. type Rule struct { // Destinations: Optional. List of attributes for the traffic @@ -2106,95 +2477,90 @@ func (s *ValidationCA) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// method id "networksecurity.projects.locations.get": +// method id "networksecurity.organizations.locations.addressGroups.addItems": -type ProjectsLocationsGetCall struct { - s *Service - name string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header +type OrganizationsLocationsAddressGroupsAddItemsCall struct { + s *Service + addressGroup string + addaddressgroupitemsrequest *AddAddressGroupItemsRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// Get: Gets information about a location. +// AddItems: Adds items to an address group. // -// - name: Resource name for the location. -func (r *ProjectsLocationsService) Get(name string) *ProjectsLocationsGetCall { - c := &ProjectsLocationsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.name = name +// - addressGroup: A name of the AddressGroup to add items to. Must be +// in the format +// `projects|organization/*/locations/{location}/addressGroups/*`. +func (r *OrganizationsLocationsAddressGroupsService) AddItems(addressGroup string, addaddressgroupitemsrequest *AddAddressGroupItemsRequest) *OrganizationsLocationsAddressGroupsAddItemsCall { + c := &OrganizationsLocationsAddressGroupsAddItemsCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.addressGroup = addressGroup + c.addaddressgroupitemsrequest = addaddressgroupitemsrequest return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *ProjectsLocationsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsGetCall { +func (c *OrganizationsLocationsAddressGroupsAddItemsCall) Fields(s ...googleapi.Field) *OrganizationsLocationsAddressGroupsAddItemsCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } -// IfNoneMatch sets the optional parameter which makes the operation -// fail if the object's ETag matches the given value. This is useful for -// getting updates only after the object has changed since the last -// request. Use googleapi.IsNotModified to check whether the response -// error from Do is the result of In-None-Match. -func (c *ProjectsLocationsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsGetCall { - c.ifNoneMatch_ = entityTag - return c -} - // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *ProjectsLocationsGetCall) Context(ctx context.Context) *ProjectsLocationsGetCall { +func (c *OrganizationsLocationsAddressGroupsAddItemsCall) Context(ctx context.Context) *OrganizationsLocationsAddressGroupsAddItemsCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *ProjectsLocationsGetCall) Header() http.Header { +func (c *OrganizationsLocationsAddressGroupsAddItemsCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsGetCall) doRequest(alt string) (*http.Response, error) { +func (c *OrganizationsLocationsAddressGroupsAddItemsCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { reqHeaders[k] = v } reqHeaders.Set("User-Agent", c.s.userAgent()) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } var body io.Reader = nil - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, body) + body, err := googleapi.WithoutDataWrapper.JSONReader(c.addaddressgroupitemsrequest) if err != nil { return nil, err } - req.Header = reqHeaders + reqHeaders.Set("Content-Type", "application/json") + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+addressGroup}:addItems") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("POST", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "name": c.name, + "addressGroup": c.addressGroup, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "networksecurity.projects.locations.get" call. -// Exactly one of *Location or error will be non-nil. Any non-2xx status -// code is an error. Response headers are in either -// *Location.ServerResponse.Header or (if a response was returned at +// Do executes the "networksecurity.organizations.locations.addressGroups.addItems" call. +// Exactly one of *Operation or error will be non-nil. Any non-2xx +// status code is an error. Response headers are in either +// *Operation.ServerResponse.Header or (if a response was returned at // all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified // to check whether the returned error was because // http.StatusNotModified was returned. -func (c *ProjectsLocationsGetCall) Do(opts ...googleapi.CallOption) (*Location, error) { +func (c *OrganizationsLocationsAddressGroupsAddItemsCall) Do(opts ...googleapi.CallOption) (*Operation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -2213,7 +2579,7 @@ func (c *ProjectsLocationsGetCall) Do(opts ...googleapi.CallOption) (*Location, if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &Location{ + ret := &Operation{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -2225,25 +2591,28 @@ func (c *ProjectsLocationsGetCall) Do(opts ...googleapi.CallOption) (*Location, } return ret, nil // { - // "description": "Gets information about a location.", - // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}", - // "httpMethod": "GET", - // "id": "networksecurity.projects.locations.get", + // "description": "Adds items to an address group.", + // "flatPath": "v1/organizations/{organizationsId}/locations/{locationsId}/addressGroups/{addressGroupsId}:addItems", + // "httpMethod": "POST", + // "id": "networksecurity.organizations.locations.addressGroups.addItems", // "parameterOrder": [ - // "name" + // "addressGroup" // ], // "parameters": { - // "name": { - // "description": "Resource name for the location.", + // "addressGroup": { + // "description": "Required. A name of the AddressGroup to add items to. Must be in the format `projects|organization/*/locations/{location}/addressGroups/*`.", // "location": "path", - // "pattern": "^projects/[^/]+/locations/[^/]+$", + // "pattern": "^organizations/[^/]+/locations/[^/]+/addressGroups/[^/]+$", // "required": true, // "type": "string" // } // }, - // "path": "v1/{+name}", + // "path": "v1/{+addressGroup}:addItems", + // "request": { + // "$ref": "AddAddressGroupItemsRequest" + // }, // "response": { - // "$ref": "Location" + // "$ref": "Operation" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -2252,121 +2621,261 @@ func (c *ProjectsLocationsGetCall) Do(opts ...googleapi.CallOption) (*Location, } -// method id "networksecurity.projects.locations.list": +// method id "networksecurity.organizations.locations.addressGroups.cloneItems": -type ProjectsLocationsListCall struct { +type OrganizationsLocationsAddressGroupsCloneItemsCall struct { + s *Service + addressGroup string + cloneaddressgroupitemsrequest *CloneAddressGroupItemsRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// CloneItems: Clones items from one address group to another. +// +// - addressGroup: A name of the AddressGroup to clone items to. Must be +// in the format +// `projects|organization/*/locations/{location}/addressGroups/*`. +func (r *OrganizationsLocationsAddressGroupsService) CloneItems(addressGroup string, cloneaddressgroupitemsrequest *CloneAddressGroupItemsRequest) *OrganizationsLocationsAddressGroupsCloneItemsCall { + c := &OrganizationsLocationsAddressGroupsCloneItemsCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.addressGroup = addressGroup + c.cloneaddressgroupitemsrequest = cloneaddressgroupitemsrequest + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *OrganizationsLocationsAddressGroupsCloneItemsCall) Fields(s ...googleapi.Field) *OrganizationsLocationsAddressGroupsCloneItemsCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *OrganizationsLocationsAddressGroupsCloneItemsCall) Context(ctx context.Context) *OrganizationsLocationsAddressGroupsCloneItemsCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *OrganizationsLocationsAddressGroupsCloneItemsCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *OrganizationsLocationsAddressGroupsCloneItemsCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.cloneaddressgroupitemsrequest) + if err != nil { + return nil, err + } + reqHeaders.Set("Content-Type", "application/json") + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+addressGroup}:cloneItems") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("POST", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "addressGroup": c.addressGroup, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "networksecurity.organizations.locations.addressGroups.cloneItems" call. +// Exactly one of *Operation or error will be non-nil. Any non-2xx +// status code is an error. Response headers are in either +// *Operation.ServerResponse.Header or (if a response was returned at +// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified +// to check whether the returned error was because +// http.StatusNotModified was returned. +func (c *OrganizationsLocationsAddressGroupsCloneItemsCall) Do(opts ...googleapi.CallOption) (*Operation, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, gensupport.WrapError(&googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + }) + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, gensupport.WrapError(err) + } + ret := &Operation{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Clones items from one address group to another.", + // "flatPath": "v1/organizations/{organizationsId}/locations/{locationsId}/addressGroups/{addressGroupsId}:cloneItems", + // "httpMethod": "POST", + // "id": "networksecurity.organizations.locations.addressGroups.cloneItems", + // "parameterOrder": [ + // "addressGroup" + // ], + // "parameters": { + // "addressGroup": { + // "description": "Required. A name of the AddressGroup to clone items to. Must be in the format `projects|organization/*/locations/{location}/addressGroups/*`.", + // "location": "path", + // "pattern": "^organizations/[^/]+/locations/[^/]+/addressGroups/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1/{+addressGroup}:cloneItems", + // "request": { + // "$ref": "CloneAddressGroupItemsRequest" + // }, + // "response": { + // "$ref": "Operation" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "networksecurity.organizations.locations.addressGroups.create": + +type OrganizationsLocationsAddressGroupsCreateCall struct { s *Service - name string + parent string + addressgroup *AddressGroup urlParams_ gensupport.URLParams - ifNoneMatch_ string ctx_ context.Context header_ http.Header } -// List: Lists information about the supported locations for this -// service. +// Create: Creates a new address group in a given project and location. // -// - name: The resource that owns the locations collection, if -// applicable. -func (r *ProjectsLocationsService) List(name string) *ProjectsLocationsListCall { - c := &ProjectsLocationsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.name = name - return c -} - -// Filter sets the optional parameter "filter": A filter to narrow down -// results to a preferred subset. The filtering language accepts strings -// like "displayName=tokyo", and is documented in more detail in -// AIP-160 (https://google.aip.dev/160). -func (c *ProjectsLocationsListCall) Filter(filter string) *ProjectsLocationsListCall { - c.urlParams_.Set("filter", filter) +// - parent: The parent resource of the AddressGroup. Must be in the +// format `projects/*/locations/{location}`. +func (r *OrganizationsLocationsAddressGroupsService) Create(parent string, addressgroup *AddressGroup) *OrganizationsLocationsAddressGroupsCreateCall { + c := &OrganizationsLocationsAddressGroupsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + c.addressgroup = addressgroup return c } -// PageSize sets the optional parameter "pageSize": The maximum number -// of results to return. If not set, the service selects a default. -func (c *ProjectsLocationsListCall) PageSize(pageSize int64) *ProjectsLocationsListCall { - c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) +// AddressGroupId sets the optional parameter "addressGroupId": +// Required. Short name of the AddressGroup resource to be created. This +// value should be 1-63 characters long, containing only letters, +// numbers, hyphens, and underscores, and should not start with a +// number. E.g. "authz_policy". +func (c *OrganizationsLocationsAddressGroupsCreateCall) AddressGroupId(addressGroupId string) *OrganizationsLocationsAddressGroupsCreateCall { + c.urlParams_.Set("addressGroupId", addressGroupId) return c } -// PageToken sets the optional parameter "pageToken": A page token -// received from the `next_page_token` field in the response. Send that -// page token to receive the subsequent page. -func (c *ProjectsLocationsListCall) PageToken(pageToken string) *ProjectsLocationsListCall { - c.urlParams_.Set("pageToken", pageToken) +// RequestId sets the optional parameter "requestId": An optional +// request ID to identify requests. Specify a unique request ID so that +// if you must retry your request, the server will know to ignore the +// request if it has already been completed. The server will guarantee +// that for at least 60 minutes since the first request. For example, +// consider a situation where you make an initial request and the +// request times out. If you make the request again with the same +// request ID, the server can check if original operation with the same +// request ID was received, and if so, will ignore the second request. +// This prevents clients from accidentally creating duplicate +// commitments. The request ID must be a valid UUID with the exception +// that zero UUID is not supported +// (00000000-0000-0000-0000-000000000000). +func (c *OrganizationsLocationsAddressGroupsCreateCall) RequestId(requestId string) *OrganizationsLocationsAddressGroupsCreateCall { + c.urlParams_.Set("requestId", requestId) return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *ProjectsLocationsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsListCall { +func (c *OrganizationsLocationsAddressGroupsCreateCall) Fields(s ...googleapi.Field) *OrganizationsLocationsAddressGroupsCreateCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } -// IfNoneMatch sets the optional parameter which makes the operation -// fail if the object's ETag matches the given value. This is useful for -// getting updates only after the object has changed since the last -// request. Use googleapi.IsNotModified to check whether the response -// error from Do is the result of In-None-Match. -func (c *ProjectsLocationsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsListCall { - c.ifNoneMatch_ = entityTag - return c -} - // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *ProjectsLocationsListCall) Context(ctx context.Context) *ProjectsLocationsListCall { +func (c *OrganizationsLocationsAddressGroupsCreateCall) Context(ctx context.Context) *OrganizationsLocationsAddressGroupsCreateCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *ProjectsLocationsListCall) Header() http.Header { +func (c *OrganizationsLocationsAddressGroupsCreateCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsListCall) doRequest(alt string) (*http.Response, error) { +func (c *OrganizationsLocationsAddressGroupsCreateCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { reqHeaders[k] = v } reqHeaders.Set("User-Agent", c.s.userAgent()) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.addressgroup) + if err != nil { + return nil, err + } + reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}/locations") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/addressGroups") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, body) + req, err := http.NewRequest("POST", urls, body) if err != nil { return nil, err } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "name": c.name, + "parent": c.parent, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "networksecurity.projects.locations.list" call. -// Exactly one of *ListLocationsResponse or error will be non-nil. Any -// non-2xx status code is an error. Response headers are in either -// *ListLocationsResponse.ServerResponse.Header or (if a response was -// returned at all) in error.(*googleapi.Error).Header. Use -// googleapi.IsNotModified to check whether the returned error was -// because http.StatusNotModified was returned. -func (c *ProjectsLocationsListCall) Do(opts ...googleapi.CallOption) (*ListLocationsResponse, error) { +// Do executes the "networksecurity.organizations.locations.addressGroups.create" call. +// Exactly one of *Operation or error will be non-nil. Any non-2xx +// status code is an error. Response headers are in either +// *Operation.ServerResponse.Header or (if a response was returned at +// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified +// to check whether the returned error was because +// http.StatusNotModified was returned. +func (c *OrganizationsLocationsAddressGroupsCreateCall) Do(opts ...googleapi.CallOption) (*Operation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -2385,7 +2894,7 @@ func (c *ProjectsLocationsListCall) Do(opts ...googleapi.CallOption) (*ListLocat if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &ListLocationsResponse{ + ret := &Operation{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -2397,41 +2906,38 @@ func (c *ProjectsLocationsListCall) Do(opts ...googleapi.CallOption) (*ListLocat } return ret, nil // { - // "description": "Lists information about the supported locations for this service.", - // "flatPath": "v1/projects/{projectsId}/locations", - // "httpMethod": "GET", - // "id": "networksecurity.projects.locations.list", + // "description": "Creates a new address group in a given project and location.", + // "flatPath": "v1/organizations/{organizationsId}/locations/{locationsId}/addressGroups", + // "httpMethod": "POST", + // "id": "networksecurity.organizations.locations.addressGroups.create", // "parameterOrder": [ - // "name" + // "parent" // ], // "parameters": { - // "filter": { - // "description": "A filter to narrow down results to a preferred subset. The filtering language accepts strings like `\"displayName=tokyo\"`, and is documented in more detail in [AIP-160](https://google.aip.dev/160).", + // "addressGroupId": { + // "description": "Required. Short name of the AddressGroup resource to be created. This value should be 1-63 characters long, containing only letters, numbers, hyphens, and underscores, and should not start with a number. E.g. \"authz_policy\".", // "location": "query", // "type": "string" // }, - // "name": { - // "description": "The resource that owns the locations collection, if applicable.", + // "parent": { + // "description": "Required. The parent resource of the AddressGroup. Must be in the format `projects/*/locations/{location}`.", // "location": "path", - // "pattern": "^projects/[^/]+$", + // "pattern": "^organizations/[^/]+/locations/[^/]+$", // "required": true, // "type": "string" // }, - // "pageSize": { - // "description": "The maximum number of results to return. If not set, the service selects a default.", - // "format": "int32", - // "location": "query", - // "type": "integer" - // }, - // "pageToken": { - // "description": "A page token received from the `next_page_token` field in the response. Send that page token to receive the subsequent page.", + // "requestId": { + // "description": "Optional. An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. The server will guarantee that for at least 60 minutes since the first request. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", // "location": "query", // "type": "string" // } // }, - // "path": "v1/{+name}/locations", + // "path": "v1/{+parent}/addressGroups", + // "request": { + // "$ref": "AddressGroup" + // }, // "response": { - // "$ref": "ListLocationsResponse" + // "$ref": "Operation" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -2440,25 +2946,3989 @@ func (c *ProjectsLocationsListCall) Do(opts ...googleapi.CallOption) (*ListLocat } -// Pages invokes f for each page of results. -// A non-nil error returned from f will halt the iteration. -// The provided context supersedes any context provided to the Context method. -func (c *ProjectsLocationsListCall) Pages(ctx context.Context, f func(*ListLocationsResponse) error) error { - c.ctx_ = ctx - defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point - for { - x, err := c.Do() - if err != nil { - return err - } +// method id "networksecurity.organizations.locations.addressGroups.delete": + +type OrganizationsLocationsAddressGroupsDeleteCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Delete: Deletes an address group. +// +// - name: A name of the AddressGroup to delete. Must be in the format +// `projects/*/locations/{location}/addressGroups/*`. +func (r *OrganizationsLocationsAddressGroupsService) Delete(name string) *OrganizationsLocationsAddressGroupsDeleteCall { + c := &OrganizationsLocationsAddressGroupsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + return c +} + +// RequestId sets the optional parameter "requestId": An optional +// request ID to identify requests. Specify a unique request ID so that +// if you must retry your request, the server will know to ignore the +// request if it has already been completed. The server will guarantee +// that for at least 60 minutes since the first request. For example, +// consider a situation where you make an initial request and the +// request times out. If you make the request again with the same +// request ID, the server can check if original operation with the same +// request ID was received, and if so, will ignore the second request. +// This prevents clients from accidentally creating duplicate +// commitments. The request ID must be a valid UUID with the exception +// that zero UUID is not supported +// (00000000-0000-0000-0000-000000000000). +func (c *OrganizationsLocationsAddressGroupsDeleteCall) RequestId(requestId string) *OrganizationsLocationsAddressGroupsDeleteCall { + c.urlParams_.Set("requestId", requestId) + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *OrganizationsLocationsAddressGroupsDeleteCall) Fields(s ...googleapi.Field) *OrganizationsLocationsAddressGroupsDeleteCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *OrganizationsLocationsAddressGroupsDeleteCall) Context(ctx context.Context) *OrganizationsLocationsAddressGroupsDeleteCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *OrganizationsLocationsAddressGroupsDeleteCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *OrganizationsLocationsAddressGroupsDeleteCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + var body io.Reader = nil + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("DELETE", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "name": c.name, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "networksecurity.organizations.locations.addressGroups.delete" call. +// Exactly one of *Operation or error will be non-nil. Any non-2xx +// status code is an error. Response headers are in either +// *Operation.ServerResponse.Header or (if a response was returned at +// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified +// to check whether the returned error was because +// http.StatusNotModified was returned. +func (c *OrganizationsLocationsAddressGroupsDeleteCall) Do(opts ...googleapi.CallOption) (*Operation, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, gensupport.WrapError(&googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + }) + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, gensupport.WrapError(err) + } + ret := &Operation{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Deletes an address group.", + // "flatPath": "v1/organizations/{organizationsId}/locations/{locationsId}/addressGroups/{addressGroupsId}", + // "httpMethod": "DELETE", + // "id": "networksecurity.organizations.locations.addressGroups.delete", + // "parameterOrder": [ + // "name" + // ], + // "parameters": { + // "name": { + // "description": "Required. A name of the AddressGroup to delete. Must be in the format `projects/*/locations/{location}/addressGroups/*`.", + // "location": "path", + // "pattern": "^organizations/[^/]+/locations/[^/]+/addressGroups/[^/]+$", + // "required": true, + // "type": "string" + // }, + // "requestId": { + // "description": "Optional. An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. The server will guarantee that for at least 60 minutes since the first request. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", + // "location": "query", + // "type": "string" + // } + // }, + // "path": "v1/{+name}", + // "response": { + // "$ref": "Operation" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "networksecurity.organizations.locations.addressGroups.get": + +type OrganizationsLocationsAddressGroupsGetCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// Get: Gets details of a single address group. +// +// - name: A name of the AddressGroup to get. Must be in the format +// `projects/*/locations/{location}/addressGroups/*`. +func (r *OrganizationsLocationsAddressGroupsService) Get(name string) *OrganizationsLocationsAddressGroupsGetCall { + c := &OrganizationsLocationsAddressGroupsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *OrganizationsLocationsAddressGroupsGetCall) Fields(s ...googleapi.Field) *OrganizationsLocationsAddressGroupsGetCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// IfNoneMatch sets the optional parameter which makes the operation +// fail if the object's ETag matches the given value. This is useful for +// getting updates only after the object has changed since the last +// request. Use googleapi.IsNotModified to check whether the response +// error from Do is the result of In-None-Match. +func (c *OrganizationsLocationsAddressGroupsGetCall) IfNoneMatch(entityTag string) *OrganizationsLocationsAddressGroupsGetCall { + c.ifNoneMatch_ = entityTag + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *OrganizationsLocationsAddressGroupsGetCall) Context(ctx context.Context) *OrganizationsLocationsAddressGroupsGetCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *OrganizationsLocationsAddressGroupsGetCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *OrganizationsLocationsAddressGroupsGetCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) + } + var body io.Reader = nil + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("GET", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "name": c.name, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "networksecurity.organizations.locations.addressGroups.get" call. +// Exactly one of *AddressGroup or error will be non-nil. Any non-2xx +// status code is an error. Response headers are in either +// *AddressGroup.ServerResponse.Header or (if a response was returned at +// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified +// to check whether the returned error was because +// http.StatusNotModified was returned. +func (c *OrganizationsLocationsAddressGroupsGetCall) Do(opts ...googleapi.CallOption) (*AddressGroup, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, gensupport.WrapError(&googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + }) + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, gensupport.WrapError(err) + } + ret := &AddressGroup{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Gets details of a single address group.", + // "flatPath": "v1/organizations/{organizationsId}/locations/{locationsId}/addressGroups/{addressGroupsId}", + // "httpMethod": "GET", + // "id": "networksecurity.organizations.locations.addressGroups.get", + // "parameterOrder": [ + // "name" + // ], + // "parameters": { + // "name": { + // "description": "Required. A name of the AddressGroup to get. Must be in the format `projects/*/locations/{location}/addressGroups/*`.", + // "location": "path", + // "pattern": "^organizations/[^/]+/locations/[^/]+/addressGroups/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1/{+name}", + // "response": { + // "$ref": "AddressGroup" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "networksecurity.organizations.locations.addressGroups.list": + +type OrganizationsLocationsAddressGroupsListCall struct { + s *Service + parent string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// List: Lists address groups in a given project and location. +// +// - parent: The project and location from which the AddressGroups +// should be listed, specified in the format +// `projects/*/locations/{location}`. +func (r *OrganizationsLocationsAddressGroupsService) List(parent string) *OrganizationsLocationsAddressGroupsListCall { + c := &OrganizationsLocationsAddressGroupsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + return c +} + +// PageSize sets the optional parameter "pageSize": Maximum number of +// AddressGroups to return per call. +func (c *OrganizationsLocationsAddressGroupsListCall) PageSize(pageSize int64) *OrganizationsLocationsAddressGroupsListCall { + c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) + return c +} + +// PageToken sets the optional parameter "pageToken": The value returned +// by the last `ListAddressGroupsResponse` Indicates that this is a +// continuation of a prior `ListAddressGroups` call, and that the system +// should return the next page of data. +func (c *OrganizationsLocationsAddressGroupsListCall) PageToken(pageToken string) *OrganizationsLocationsAddressGroupsListCall { + c.urlParams_.Set("pageToken", pageToken) + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *OrganizationsLocationsAddressGroupsListCall) Fields(s ...googleapi.Field) *OrganizationsLocationsAddressGroupsListCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// IfNoneMatch sets the optional parameter which makes the operation +// fail if the object's ETag matches the given value. This is useful for +// getting updates only after the object has changed since the last +// request. Use googleapi.IsNotModified to check whether the response +// error from Do is the result of In-None-Match. +func (c *OrganizationsLocationsAddressGroupsListCall) IfNoneMatch(entityTag string) *OrganizationsLocationsAddressGroupsListCall { + c.ifNoneMatch_ = entityTag + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *OrganizationsLocationsAddressGroupsListCall) Context(ctx context.Context) *OrganizationsLocationsAddressGroupsListCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *OrganizationsLocationsAddressGroupsListCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *OrganizationsLocationsAddressGroupsListCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) + } + var body io.Reader = nil + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/addressGroups") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("GET", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "parent": c.parent, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "networksecurity.organizations.locations.addressGroups.list" call. +// Exactly one of *ListAddressGroupsResponse or error will be non-nil. +// Any non-2xx status code is an error. Response headers are in either +// *ListAddressGroupsResponse.ServerResponse.Header or (if a response +// was returned at all) in error.(*googleapi.Error).Header. Use +// googleapi.IsNotModified to check whether the returned error was +// because http.StatusNotModified was returned. +func (c *OrganizationsLocationsAddressGroupsListCall) Do(opts ...googleapi.CallOption) (*ListAddressGroupsResponse, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, gensupport.WrapError(&googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + }) + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, gensupport.WrapError(err) + } + ret := &ListAddressGroupsResponse{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Lists address groups in a given project and location.", + // "flatPath": "v1/organizations/{organizationsId}/locations/{locationsId}/addressGroups", + // "httpMethod": "GET", + // "id": "networksecurity.organizations.locations.addressGroups.list", + // "parameterOrder": [ + // "parent" + // ], + // "parameters": { + // "pageSize": { + // "description": "Maximum number of AddressGroups to return per call.", + // "format": "int32", + // "location": "query", + // "type": "integer" + // }, + // "pageToken": { + // "description": "The value returned by the last `ListAddressGroupsResponse` Indicates that this is a continuation of a prior `ListAddressGroups` call, and that the system should return the next page of data.", + // "location": "query", + // "type": "string" + // }, + // "parent": { + // "description": "Required. The project and location from which the AddressGroups should be listed, specified in the format `projects/*/locations/{location}`.", + // "location": "path", + // "pattern": "^organizations/[^/]+/locations/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1/{+parent}/addressGroups", + // "response": { + // "$ref": "ListAddressGroupsResponse" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// Pages invokes f for each page of results. +// A non-nil error returned from f will halt the iteration. +// The provided context supersedes any context provided to the Context method. +func (c *OrganizationsLocationsAddressGroupsListCall) Pages(ctx context.Context, f func(*ListAddressGroupsResponse) error) error { + c.ctx_ = ctx + defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point + for { + x, err := c.Do() + if err != nil { + return err + } + if err := f(x); err != nil { + return err + } + if x.NextPageToken == "" { + return nil + } + c.PageToken(x.NextPageToken) + } +} + +// method id "networksecurity.organizations.locations.addressGroups.listReferences": + +type OrganizationsLocationsAddressGroupsListReferencesCall struct { + s *Service + addressGroup string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// ListReferences: Lists references of an address group. +// +// - addressGroup: A name of the AddressGroup to clone items to. Must be +// in the format +// `projects|organization/*/locations/{location}/addressGroups/*`. +func (r *OrganizationsLocationsAddressGroupsService) ListReferences(addressGroup string) *OrganizationsLocationsAddressGroupsListReferencesCall { + c := &OrganizationsLocationsAddressGroupsListReferencesCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.addressGroup = addressGroup + return c +} + +// PageSize sets the optional parameter "pageSize": The maximum number +// of references to return. If unspecified, server will pick an +// appropriate default. Server may return fewer items than requested. A +// caller should only rely on response's next_page_token to determine if +// there are more AddressGroupUsers left to be queried. +func (c *OrganizationsLocationsAddressGroupsListReferencesCall) PageSize(pageSize int64) *OrganizationsLocationsAddressGroupsListReferencesCall { + c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) + return c +} + +// PageToken sets the optional parameter "pageToken": The +// next_page_token value returned from a previous List request, if any. +func (c *OrganizationsLocationsAddressGroupsListReferencesCall) PageToken(pageToken string) *OrganizationsLocationsAddressGroupsListReferencesCall { + c.urlParams_.Set("pageToken", pageToken) + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *OrganizationsLocationsAddressGroupsListReferencesCall) Fields(s ...googleapi.Field) *OrganizationsLocationsAddressGroupsListReferencesCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// IfNoneMatch sets the optional parameter which makes the operation +// fail if the object's ETag matches the given value. This is useful for +// getting updates only after the object has changed since the last +// request. Use googleapi.IsNotModified to check whether the response +// error from Do is the result of In-None-Match. +func (c *OrganizationsLocationsAddressGroupsListReferencesCall) IfNoneMatch(entityTag string) *OrganizationsLocationsAddressGroupsListReferencesCall { + c.ifNoneMatch_ = entityTag + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *OrganizationsLocationsAddressGroupsListReferencesCall) Context(ctx context.Context) *OrganizationsLocationsAddressGroupsListReferencesCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *OrganizationsLocationsAddressGroupsListReferencesCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *OrganizationsLocationsAddressGroupsListReferencesCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) + } + var body io.Reader = nil + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+addressGroup}:listReferences") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("GET", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "addressGroup": c.addressGroup, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "networksecurity.organizations.locations.addressGroups.listReferences" call. +// Exactly one of *ListAddressGroupReferencesResponse or error will be +// non-nil. Any non-2xx status code is an error. Response headers are in +// either *ListAddressGroupReferencesResponse.ServerResponse.Header or +// (if a response was returned at all) in +// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check +// whether the returned error was because http.StatusNotModified was +// returned. +func (c *OrganizationsLocationsAddressGroupsListReferencesCall) Do(opts ...googleapi.CallOption) (*ListAddressGroupReferencesResponse, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, gensupport.WrapError(&googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + }) + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, gensupport.WrapError(err) + } + ret := &ListAddressGroupReferencesResponse{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Lists references of an address group.", + // "flatPath": "v1/organizations/{organizationsId}/locations/{locationsId}/addressGroups/{addressGroupsId}:listReferences", + // "httpMethod": "GET", + // "id": "networksecurity.organizations.locations.addressGroups.listReferences", + // "parameterOrder": [ + // "addressGroup" + // ], + // "parameters": { + // "addressGroup": { + // "description": "Required. A name of the AddressGroup to clone items to. Must be in the format `projects|organization/*/locations/{location}/addressGroups/*`.", + // "location": "path", + // "pattern": "^organizations/[^/]+/locations/[^/]+/addressGroups/[^/]+$", + // "required": true, + // "type": "string" + // }, + // "pageSize": { + // "description": "The maximum number of references to return. If unspecified, server will pick an appropriate default. Server may return fewer items than requested. A caller should only rely on response's next_page_token to determine if there are more AddressGroupUsers left to be queried.", + // "format": "int32", + // "location": "query", + // "type": "integer" + // }, + // "pageToken": { + // "description": "The next_page_token value returned from a previous List request, if any.", + // "location": "query", + // "type": "string" + // } + // }, + // "path": "v1/{+addressGroup}:listReferences", + // "response": { + // "$ref": "ListAddressGroupReferencesResponse" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// Pages invokes f for each page of results. +// A non-nil error returned from f will halt the iteration. +// The provided context supersedes any context provided to the Context method. +func (c *OrganizationsLocationsAddressGroupsListReferencesCall) Pages(ctx context.Context, f func(*ListAddressGroupReferencesResponse) error) error { + c.ctx_ = ctx + defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point + for { + x, err := c.Do() + if err != nil { + return err + } + if err := f(x); err != nil { + return err + } + if x.NextPageToken == "" { + return nil + } + c.PageToken(x.NextPageToken) + } +} + +// method id "networksecurity.organizations.locations.addressGroups.patch": + +type OrganizationsLocationsAddressGroupsPatchCall struct { + s *Service + name string + addressgroup *AddressGroup + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Patch: Updates parameters of an address group. +// +// - name: Name of the AddressGroup resource. It matches pattern +// `projects/*/locations/{location}/addressGroups/`. +func (r *OrganizationsLocationsAddressGroupsService) Patch(name string, addressgroup *AddressGroup) *OrganizationsLocationsAddressGroupsPatchCall { + c := &OrganizationsLocationsAddressGroupsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + c.addressgroup = addressgroup + return c +} + +// RequestId sets the optional parameter "requestId": An optional +// request ID to identify requests. Specify a unique request ID so that +// if you must retry your request, the server will know to ignore the +// request if it has already been completed. The server will guarantee +// that for at least 60 minutes since the first request. For example, +// consider a situation where you make an initial request and the +// request times out. If you make the request again with the same +// request ID, the server can check if original operation with the same +// request ID was received, and if so, will ignore the second request. +// This prevents clients from accidentally creating duplicate +// commitments. The request ID must be a valid UUID with the exception +// that zero UUID is not supported +// (00000000-0000-0000-0000-000000000000). +func (c *OrganizationsLocationsAddressGroupsPatchCall) RequestId(requestId string) *OrganizationsLocationsAddressGroupsPatchCall { + c.urlParams_.Set("requestId", requestId) + return c +} + +// UpdateMask sets the optional parameter "updateMask": Field mask is +// used to specify the fields to be overwritten in the AddressGroup +// resource by the update. The fields specified in the update_mask are +// relative to the resource, not the full request. A field will be +// overwritten if it is in the mask. If the user does not provide a mask +// then all fields will be overwritten. +func (c *OrganizationsLocationsAddressGroupsPatchCall) UpdateMask(updateMask string) *OrganizationsLocationsAddressGroupsPatchCall { + c.urlParams_.Set("updateMask", updateMask) + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *OrganizationsLocationsAddressGroupsPatchCall) Fields(s ...googleapi.Field) *OrganizationsLocationsAddressGroupsPatchCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *OrganizationsLocationsAddressGroupsPatchCall) Context(ctx context.Context) *OrganizationsLocationsAddressGroupsPatchCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *OrganizationsLocationsAddressGroupsPatchCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *OrganizationsLocationsAddressGroupsPatchCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.addressgroup) + if err != nil { + return nil, err + } + reqHeaders.Set("Content-Type", "application/json") + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("PATCH", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "name": c.name, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "networksecurity.organizations.locations.addressGroups.patch" call. +// Exactly one of *Operation or error will be non-nil. Any non-2xx +// status code is an error. Response headers are in either +// *Operation.ServerResponse.Header or (if a response was returned at +// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified +// to check whether the returned error was because +// http.StatusNotModified was returned. +func (c *OrganizationsLocationsAddressGroupsPatchCall) Do(opts ...googleapi.CallOption) (*Operation, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, gensupport.WrapError(&googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + }) + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, gensupport.WrapError(err) + } + ret := &Operation{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Updates parameters of an address group.", + // "flatPath": "v1/organizations/{organizationsId}/locations/{locationsId}/addressGroups/{addressGroupsId}", + // "httpMethod": "PATCH", + // "id": "networksecurity.organizations.locations.addressGroups.patch", + // "parameterOrder": [ + // "name" + // ], + // "parameters": { + // "name": { + // "description": "Required. Name of the AddressGroup resource. It matches pattern `projects/*/locations/{location}/addressGroups/`.", + // "location": "path", + // "pattern": "^organizations/[^/]+/locations/[^/]+/addressGroups/[^/]+$", + // "required": true, + // "type": "string" + // }, + // "requestId": { + // "description": "Optional. An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. The server will guarantee that for at least 60 minutes since the first request. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", + // "location": "query", + // "type": "string" + // }, + // "updateMask": { + // "description": "Optional. Field mask is used to specify the fields to be overwritten in the AddressGroup resource by the update. The fields specified in the update_mask are relative to the resource, not the full request. A field will be overwritten if it is in the mask. If the user does not provide a mask then all fields will be overwritten.", + // "format": "google-fieldmask", + // "location": "query", + // "type": "string" + // } + // }, + // "path": "v1/{+name}", + // "request": { + // "$ref": "AddressGroup" + // }, + // "response": { + // "$ref": "Operation" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "networksecurity.organizations.locations.addressGroups.removeItems": + +type OrganizationsLocationsAddressGroupsRemoveItemsCall struct { + s *Service + addressGroup string + removeaddressgroupitemsrequest *RemoveAddressGroupItemsRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// RemoveItems: Removes items from an address group. +// +// - addressGroup: A name of the AddressGroup to remove items from. Must +// be in the format +// `projects|organization/*/locations/{location}/addressGroups/*`. +func (r *OrganizationsLocationsAddressGroupsService) RemoveItems(addressGroup string, removeaddressgroupitemsrequest *RemoveAddressGroupItemsRequest) *OrganizationsLocationsAddressGroupsRemoveItemsCall { + c := &OrganizationsLocationsAddressGroupsRemoveItemsCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.addressGroup = addressGroup + c.removeaddressgroupitemsrequest = removeaddressgroupitemsrequest + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *OrganizationsLocationsAddressGroupsRemoveItemsCall) Fields(s ...googleapi.Field) *OrganizationsLocationsAddressGroupsRemoveItemsCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *OrganizationsLocationsAddressGroupsRemoveItemsCall) Context(ctx context.Context) *OrganizationsLocationsAddressGroupsRemoveItemsCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *OrganizationsLocationsAddressGroupsRemoveItemsCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *OrganizationsLocationsAddressGroupsRemoveItemsCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.removeaddressgroupitemsrequest) + if err != nil { + return nil, err + } + reqHeaders.Set("Content-Type", "application/json") + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+addressGroup}:removeItems") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("POST", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "addressGroup": c.addressGroup, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "networksecurity.organizations.locations.addressGroups.removeItems" call. +// Exactly one of *Operation or error will be non-nil. Any non-2xx +// status code is an error. Response headers are in either +// *Operation.ServerResponse.Header or (if a response was returned at +// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified +// to check whether the returned error was because +// http.StatusNotModified was returned. +func (c *OrganizationsLocationsAddressGroupsRemoveItemsCall) Do(opts ...googleapi.CallOption) (*Operation, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, gensupport.WrapError(&googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + }) + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, gensupport.WrapError(err) + } + ret := &Operation{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Removes items from an address group.", + // "flatPath": "v1/organizations/{organizationsId}/locations/{locationsId}/addressGroups/{addressGroupsId}:removeItems", + // "httpMethod": "POST", + // "id": "networksecurity.organizations.locations.addressGroups.removeItems", + // "parameterOrder": [ + // "addressGroup" + // ], + // "parameters": { + // "addressGroup": { + // "description": "Required. A name of the AddressGroup to remove items from. Must be in the format `projects|organization/*/locations/{location}/addressGroups/*`.", + // "location": "path", + // "pattern": "^organizations/[^/]+/locations/[^/]+/addressGroups/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1/{+addressGroup}:removeItems", + // "request": { + // "$ref": "RemoveAddressGroupItemsRequest" + // }, + // "response": { + // "$ref": "Operation" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "networksecurity.organizations.locations.operations.cancel": + +type OrganizationsLocationsOperationsCancelCall struct { + s *Service + name string + canceloperationrequest *CancelOperationRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Cancel: Starts asynchronous cancellation on a long-running operation. +// The server makes a best effort to cancel the operation, but success +// is not guaranteed. If the server doesn't support this method, it +// returns `google.rpc.Code.UNIMPLEMENTED`. Clients can use +// Operations.GetOperation or other methods to check whether the +// cancellation succeeded or whether the operation completed despite +// cancellation. On successful cancellation, the operation is not +// deleted; instead, it becomes an operation with an Operation.error +// value with a google.rpc.Status.code of 1, corresponding to +// `Code.CANCELLED`. +// +// - name: The name of the operation resource to be cancelled. +func (r *OrganizationsLocationsOperationsService) Cancel(name string, canceloperationrequest *CancelOperationRequest) *OrganizationsLocationsOperationsCancelCall { + c := &OrganizationsLocationsOperationsCancelCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + c.canceloperationrequest = canceloperationrequest + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *OrganizationsLocationsOperationsCancelCall) Fields(s ...googleapi.Field) *OrganizationsLocationsOperationsCancelCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *OrganizationsLocationsOperationsCancelCall) Context(ctx context.Context) *OrganizationsLocationsOperationsCancelCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *OrganizationsLocationsOperationsCancelCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *OrganizationsLocationsOperationsCancelCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.canceloperationrequest) + if err != nil { + return nil, err + } + reqHeaders.Set("Content-Type", "application/json") + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}:cancel") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("POST", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "name": c.name, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "networksecurity.organizations.locations.operations.cancel" call. +// Exactly one of *Empty or error will be non-nil. Any non-2xx status +// code is an error. Response headers are in either +// *Empty.ServerResponse.Header or (if a response was returned at all) +// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to +// check whether the returned error was because http.StatusNotModified +// was returned. +func (c *OrganizationsLocationsOperationsCancelCall) Do(opts ...googleapi.CallOption) (*Empty, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, gensupport.WrapError(&googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + }) + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, gensupport.WrapError(err) + } + ret := &Empty{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Starts asynchronous cancellation on a long-running operation. The server makes a best effort to cancel the operation, but success is not guaranteed. If the server doesn't support this method, it returns `google.rpc.Code.UNIMPLEMENTED`. Clients can use Operations.GetOperation or other methods to check whether the cancellation succeeded or whether the operation completed despite cancellation. On successful cancellation, the operation is not deleted; instead, it becomes an operation with an Operation.error value with a google.rpc.Status.code of 1, corresponding to `Code.CANCELLED`.", + // "flatPath": "v1/organizations/{organizationsId}/locations/{locationsId}/operations/{operationsId}:cancel", + // "httpMethod": "POST", + // "id": "networksecurity.organizations.locations.operations.cancel", + // "parameterOrder": [ + // "name" + // ], + // "parameters": { + // "name": { + // "description": "The name of the operation resource to be cancelled.", + // "location": "path", + // "pattern": "^organizations/[^/]+/locations/[^/]+/operations/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1/{+name}:cancel", + // "request": { + // "$ref": "CancelOperationRequest" + // }, + // "response": { + // "$ref": "Empty" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "networksecurity.organizations.locations.operations.delete": + +type OrganizationsLocationsOperationsDeleteCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Delete: Deletes a long-running operation. This method indicates that +// the client is no longer interested in the operation result. It does +// not cancel the operation. If the server doesn't support this method, +// it returns `google.rpc.Code.UNIMPLEMENTED`. +// +// - name: The name of the operation resource to be deleted. +func (r *OrganizationsLocationsOperationsService) Delete(name string) *OrganizationsLocationsOperationsDeleteCall { + c := &OrganizationsLocationsOperationsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *OrganizationsLocationsOperationsDeleteCall) Fields(s ...googleapi.Field) *OrganizationsLocationsOperationsDeleteCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *OrganizationsLocationsOperationsDeleteCall) Context(ctx context.Context) *OrganizationsLocationsOperationsDeleteCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *OrganizationsLocationsOperationsDeleteCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *OrganizationsLocationsOperationsDeleteCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + var body io.Reader = nil + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("DELETE", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "name": c.name, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "networksecurity.organizations.locations.operations.delete" call. +// Exactly one of *Empty or error will be non-nil. Any non-2xx status +// code is an error. Response headers are in either +// *Empty.ServerResponse.Header or (if a response was returned at all) +// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to +// check whether the returned error was because http.StatusNotModified +// was returned. +func (c *OrganizationsLocationsOperationsDeleteCall) Do(opts ...googleapi.CallOption) (*Empty, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, gensupport.WrapError(&googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + }) + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, gensupport.WrapError(err) + } + ret := &Empty{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Deletes a long-running operation. This method indicates that the client is no longer interested in the operation result. It does not cancel the operation. If the server doesn't support this method, it returns `google.rpc.Code.UNIMPLEMENTED`.", + // "flatPath": "v1/organizations/{organizationsId}/locations/{locationsId}/operations/{operationsId}", + // "httpMethod": "DELETE", + // "id": "networksecurity.organizations.locations.operations.delete", + // "parameterOrder": [ + // "name" + // ], + // "parameters": { + // "name": { + // "description": "The name of the operation resource to be deleted.", + // "location": "path", + // "pattern": "^organizations/[^/]+/locations/[^/]+/operations/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1/{+name}", + // "response": { + // "$ref": "Empty" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "networksecurity.organizations.locations.operations.get": + +type OrganizationsLocationsOperationsGetCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// Get: Gets the latest state of a long-running operation. Clients can +// use this method to poll the operation result at intervals as +// recommended by the API service. +// +// - name: The name of the operation resource. +func (r *OrganizationsLocationsOperationsService) Get(name string) *OrganizationsLocationsOperationsGetCall { + c := &OrganizationsLocationsOperationsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *OrganizationsLocationsOperationsGetCall) Fields(s ...googleapi.Field) *OrganizationsLocationsOperationsGetCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// IfNoneMatch sets the optional parameter which makes the operation +// fail if the object's ETag matches the given value. This is useful for +// getting updates only after the object has changed since the last +// request. Use googleapi.IsNotModified to check whether the response +// error from Do is the result of In-None-Match. +func (c *OrganizationsLocationsOperationsGetCall) IfNoneMatch(entityTag string) *OrganizationsLocationsOperationsGetCall { + c.ifNoneMatch_ = entityTag + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *OrganizationsLocationsOperationsGetCall) Context(ctx context.Context) *OrganizationsLocationsOperationsGetCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *OrganizationsLocationsOperationsGetCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *OrganizationsLocationsOperationsGetCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) + } + var body io.Reader = nil + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("GET", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "name": c.name, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "networksecurity.organizations.locations.operations.get" call. +// Exactly one of *Operation or error will be non-nil. Any non-2xx +// status code is an error. Response headers are in either +// *Operation.ServerResponse.Header or (if a response was returned at +// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified +// to check whether the returned error was because +// http.StatusNotModified was returned. +func (c *OrganizationsLocationsOperationsGetCall) Do(opts ...googleapi.CallOption) (*Operation, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, gensupport.WrapError(&googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + }) + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, gensupport.WrapError(err) + } + ret := &Operation{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Gets the latest state of a long-running operation. Clients can use this method to poll the operation result at intervals as recommended by the API service.", + // "flatPath": "v1/organizations/{organizationsId}/locations/{locationsId}/operations/{operationsId}", + // "httpMethod": "GET", + // "id": "networksecurity.organizations.locations.operations.get", + // "parameterOrder": [ + // "name" + // ], + // "parameters": { + // "name": { + // "description": "The name of the operation resource.", + // "location": "path", + // "pattern": "^organizations/[^/]+/locations/[^/]+/operations/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1/{+name}", + // "response": { + // "$ref": "Operation" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "networksecurity.organizations.locations.operations.list": + +type OrganizationsLocationsOperationsListCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// List: Lists operations that match the specified filter in the +// request. If the server doesn't support this method, it returns +// `UNIMPLEMENTED`. +// +// - name: The name of the operation's parent resource. +func (r *OrganizationsLocationsOperationsService) List(name string) *OrganizationsLocationsOperationsListCall { + c := &OrganizationsLocationsOperationsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + return c +} + +// Filter sets the optional parameter "filter": The standard list +// filter. +func (c *OrganizationsLocationsOperationsListCall) Filter(filter string) *OrganizationsLocationsOperationsListCall { + c.urlParams_.Set("filter", filter) + return c +} + +// PageSize sets the optional parameter "pageSize": The standard list +// page size. +func (c *OrganizationsLocationsOperationsListCall) PageSize(pageSize int64) *OrganizationsLocationsOperationsListCall { + c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) + return c +} + +// PageToken sets the optional parameter "pageToken": The standard list +// page token. +func (c *OrganizationsLocationsOperationsListCall) PageToken(pageToken string) *OrganizationsLocationsOperationsListCall { + c.urlParams_.Set("pageToken", pageToken) + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *OrganizationsLocationsOperationsListCall) Fields(s ...googleapi.Field) *OrganizationsLocationsOperationsListCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// IfNoneMatch sets the optional parameter which makes the operation +// fail if the object's ETag matches the given value. This is useful for +// getting updates only after the object has changed since the last +// request. Use googleapi.IsNotModified to check whether the response +// error from Do is the result of In-None-Match. +func (c *OrganizationsLocationsOperationsListCall) IfNoneMatch(entityTag string) *OrganizationsLocationsOperationsListCall { + c.ifNoneMatch_ = entityTag + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *OrganizationsLocationsOperationsListCall) Context(ctx context.Context) *OrganizationsLocationsOperationsListCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *OrganizationsLocationsOperationsListCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *OrganizationsLocationsOperationsListCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) + } + var body io.Reader = nil + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}/operations") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("GET", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "name": c.name, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "networksecurity.organizations.locations.operations.list" call. +// Exactly one of *ListOperationsResponse or error will be non-nil. Any +// non-2xx status code is an error. Response headers are in either +// *ListOperationsResponse.ServerResponse.Header or (if a response was +// returned at all) in error.(*googleapi.Error).Header. Use +// googleapi.IsNotModified to check whether the returned error was +// because http.StatusNotModified was returned. +func (c *OrganizationsLocationsOperationsListCall) Do(opts ...googleapi.CallOption) (*ListOperationsResponse, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, gensupport.WrapError(&googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + }) + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, gensupport.WrapError(err) + } + ret := &ListOperationsResponse{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Lists operations that match the specified filter in the request. If the server doesn't support this method, it returns `UNIMPLEMENTED`.", + // "flatPath": "v1/organizations/{organizationsId}/locations/{locationsId}/operations", + // "httpMethod": "GET", + // "id": "networksecurity.organizations.locations.operations.list", + // "parameterOrder": [ + // "name" + // ], + // "parameters": { + // "filter": { + // "description": "The standard list filter.", + // "location": "query", + // "type": "string" + // }, + // "name": { + // "description": "The name of the operation's parent resource.", + // "location": "path", + // "pattern": "^organizations/[^/]+/locations/[^/]+$", + // "required": true, + // "type": "string" + // }, + // "pageSize": { + // "description": "The standard list page size.", + // "format": "int32", + // "location": "query", + // "type": "integer" + // }, + // "pageToken": { + // "description": "The standard list page token.", + // "location": "query", + // "type": "string" + // } + // }, + // "path": "v1/{+name}/operations", + // "response": { + // "$ref": "ListOperationsResponse" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// Pages invokes f for each page of results. +// A non-nil error returned from f will halt the iteration. +// The provided context supersedes any context provided to the Context method. +func (c *OrganizationsLocationsOperationsListCall) Pages(ctx context.Context, f func(*ListOperationsResponse) error) error { + c.ctx_ = ctx + defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point + for { + x, err := c.Do() + if err != nil { + return err + } + if err := f(x); err != nil { + return err + } + if x.NextPageToken == "" { + return nil + } + c.PageToken(x.NextPageToken) + } +} + +// method id "networksecurity.projects.locations.get": + +type ProjectsLocationsGetCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// Get: Gets information about a location. +// +// - name: Resource name for the location. +func (r *ProjectsLocationsService) Get(name string) *ProjectsLocationsGetCall { + c := &ProjectsLocationsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *ProjectsLocationsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsGetCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// IfNoneMatch sets the optional parameter which makes the operation +// fail if the object's ETag matches the given value. This is useful for +// getting updates only after the object has changed since the last +// request. Use googleapi.IsNotModified to check whether the response +// error from Do is the result of In-None-Match. +func (c *ProjectsLocationsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsGetCall { + c.ifNoneMatch_ = entityTag + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *ProjectsLocationsGetCall) Context(ctx context.Context) *ProjectsLocationsGetCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *ProjectsLocationsGetCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsGetCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) + } + var body io.Reader = nil + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("GET", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "name": c.name, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "networksecurity.projects.locations.get" call. +// Exactly one of *Location or error will be non-nil. Any non-2xx status +// code is an error. Response headers are in either +// *Location.ServerResponse.Header or (if a response was returned at +// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified +// to check whether the returned error was because +// http.StatusNotModified was returned. +func (c *ProjectsLocationsGetCall) Do(opts ...googleapi.CallOption) (*Location, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, gensupport.WrapError(&googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + }) + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, gensupport.WrapError(err) + } + ret := &Location{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Gets information about a location.", + // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}", + // "httpMethod": "GET", + // "id": "networksecurity.projects.locations.get", + // "parameterOrder": [ + // "name" + // ], + // "parameters": { + // "name": { + // "description": "Resource name for the location.", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1/{+name}", + // "response": { + // "$ref": "Location" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "networksecurity.projects.locations.list": + +type ProjectsLocationsListCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// List: Lists information about the supported locations for this +// service. +// +// - name: The resource that owns the locations collection, if +// applicable. +func (r *ProjectsLocationsService) List(name string) *ProjectsLocationsListCall { + c := &ProjectsLocationsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + return c +} + +// Filter sets the optional parameter "filter": A filter to narrow down +// results to a preferred subset. The filtering language accepts strings +// like "displayName=tokyo", and is documented in more detail in +// AIP-160 (https://google.aip.dev/160). +func (c *ProjectsLocationsListCall) Filter(filter string) *ProjectsLocationsListCall { + c.urlParams_.Set("filter", filter) + return c +} + +// PageSize sets the optional parameter "pageSize": The maximum number +// of results to return. If not set, the service selects a default. +func (c *ProjectsLocationsListCall) PageSize(pageSize int64) *ProjectsLocationsListCall { + c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) + return c +} + +// PageToken sets the optional parameter "pageToken": A page token +// received from the `next_page_token` field in the response. Send that +// page token to receive the subsequent page. +func (c *ProjectsLocationsListCall) PageToken(pageToken string) *ProjectsLocationsListCall { + c.urlParams_.Set("pageToken", pageToken) + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *ProjectsLocationsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsListCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// IfNoneMatch sets the optional parameter which makes the operation +// fail if the object's ETag matches the given value. This is useful for +// getting updates only after the object has changed since the last +// request. Use googleapi.IsNotModified to check whether the response +// error from Do is the result of In-None-Match. +func (c *ProjectsLocationsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsListCall { + c.ifNoneMatch_ = entityTag + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *ProjectsLocationsListCall) Context(ctx context.Context) *ProjectsLocationsListCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *ProjectsLocationsListCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsListCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) + } + var body io.Reader = nil + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}/locations") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("GET", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "name": c.name, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "networksecurity.projects.locations.list" call. +// Exactly one of *ListLocationsResponse or error will be non-nil. Any +// non-2xx status code is an error. Response headers are in either +// *ListLocationsResponse.ServerResponse.Header or (if a response was +// returned at all) in error.(*googleapi.Error).Header. Use +// googleapi.IsNotModified to check whether the returned error was +// because http.StatusNotModified was returned. +func (c *ProjectsLocationsListCall) Do(opts ...googleapi.CallOption) (*ListLocationsResponse, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, gensupport.WrapError(&googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + }) + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, gensupport.WrapError(err) + } + ret := &ListLocationsResponse{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Lists information about the supported locations for this service.", + // "flatPath": "v1/projects/{projectsId}/locations", + // "httpMethod": "GET", + // "id": "networksecurity.projects.locations.list", + // "parameterOrder": [ + // "name" + // ], + // "parameters": { + // "filter": { + // "description": "A filter to narrow down results to a preferred subset. The filtering language accepts strings like `\"displayName=tokyo\"`, and is documented in more detail in [AIP-160](https://google.aip.dev/160).", + // "location": "query", + // "type": "string" + // }, + // "name": { + // "description": "The resource that owns the locations collection, if applicable.", + // "location": "path", + // "pattern": "^projects/[^/]+$", + // "required": true, + // "type": "string" + // }, + // "pageSize": { + // "description": "The maximum number of results to return. If not set, the service selects a default.", + // "format": "int32", + // "location": "query", + // "type": "integer" + // }, + // "pageToken": { + // "description": "A page token received from the `next_page_token` field in the response. Send that page token to receive the subsequent page.", + // "location": "query", + // "type": "string" + // } + // }, + // "path": "v1/{+name}/locations", + // "response": { + // "$ref": "ListLocationsResponse" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// Pages invokes f for each page of results. +// A non-nil error returned from f will halt the iteration. +// The provided context supersedes any context provided to the Context method. +func (c *ProjectsLocationsListCall) Pages(ctx context.Context, f func(*ListLocationsResponse) error) error { + c.ctx_ = ctx + defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point + for { + x, err := c.Do() + if err != nil { + return err + } + if err := f(x); err != nil { + return err + } + if x.NextPageToken == "" { + return nil + } + c.PageToken(x.NextPageToken) + } +} + +// method id "networksecurity.projects.locations.addressGroups.addItems": + +type ProjectsLocationsAddressGroupsAddItemsCall struct { + s *Service + addressGroup string + addaddressgroupitemsrequest *AddAddressGroupItemsRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// AddItems: Adds items to an address group. +// +// - addressGroup: A name of the AddressGroup to add items to. Must be +// in the format +// `projects|organization/*/locations/{location}/addressGroups/*`. +func (r *ProjectsLocationsAddressGroupsService) AddItems(addressGroup string, addaddressgroupitemsrequest *AddAddressGroupItemsRequest) *ProjectsLocationsAddressGroupsAddItemsCall { + c := &ProjectsLocationsAddressGroupsAddItemsCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.addressGroup = addressGroup + c.addaddressgroupitemsrequest = addaddressgroupitemsrequest + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *ProjectsLocationsAddressGroupsAddItemsCall) Fields(s ...googleapi.Field) *ProjectsLocationsAddressGroupsAddItemsCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *ProjectsLocationsAddressGroupsAddItemsCall) Context(ctx context.Context) *ProjectsLocationsAddressGroupsAddItemsCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *ProjectsLocationsAddressGroupsAddItemsCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsAddressGroupsAddItemsCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.addaddressgroupitemsrequest) + if err != nil { + return nil, err + } + reqHeaders.Set("Content-Type", "application/json") + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+addressGroup}:addItems") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("POST", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "addressGroup": c.addressGroup, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "networksecurity.projects.locations.addressGroups.addItems" call. +// Exactly one of *Operation or error will be non-nil. Any non-2xx +// status code is an error. Response headers are in either +// *Operation.ServerResponse.Header or (if a response was returned at +// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified +// to check whether the returned error was because +// http.StatusNotModified was returned. +func (c *ProjectsLocationsAddressGroupsAddItemsCall) Do(opts ...googleapi.CallOption) (*Operation, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, gensupport.WrapError(&googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + }) + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, gensupport.WrapError(err) + } + ret := &Operation{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Adds items to an address group.", + // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/addressGroups/{addressGroupsId}:addItems", + // "httpMethod": "POST", + // "id": "networksecurity.projects.locations.addressGroups.addItems", + // "parameterOrder": [ + // "addressGroup" + // ], + // "parameters": { + // "addressGroup": { + // "description": "Required. A name of the AddressGroup to add items to. Must be in the format `projects|organization/*/locations/{location}/addressGroups/*`.", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+/addressGroups/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1/{+addressGroup}:addItems", + // "request": { + // "$ref": "AddAddressGroupItemsRequest" + // }, + // "response": { + // "$ref": "Operation" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "networksecurity.projects.locations.addressGroups.cloneItems": + +type ProjectsLocationsAddressGroupsCloneItemsCall struct { + s *Service + addressGroup string + cloneaddressgroupitemsrequest *CloneAddressGroupItemsRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// CloneItems: Clones items from one address group to another. +// +// - addressGroup: A name of the AddressGroup to clone items to. Must be +// in the format +// `projects|organization/*/locations/{location}/addressGroups/*`. +func (r *ProjectsLocationsAddressGroupsService) CloneItems(addressGroup string, cloneaddressgroupitemsrequest *CloneAddressGroupItemsRequest) *ProjectsLocationsAddressGroupsCloneItemsCall { + c := &ProjectsLocationsAddressGroupsCloneItemsCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.addressGroup = addressGroup + c.cloneaddressgroupitemsrequest = cloneaddressgroupitemsrequest + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *ProjectsLocationsAddressGroupsCloneItemsCall) Fields(s ...googleapi.Field) *ProjectsLocationsAddressGroupsCloneItemsCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *ProjectsLocationsAddressGroupsCloneItemsCall) Context(ctx context.Context) *ProjectsLocationsAddressGroupsCloneItemsCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *ProjectsLocationsAddressGroupsCloneItemsCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsAddressGroupsCloneItemsCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.cloneaddressgroupitemsrequest) + if err != nil { + return nil, err + } + reqHeaders.Set("Content-Type", "application/json") + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+addressGroup}:cloneItems") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("POST", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "addressGroup": c.addressGroup, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "networksecurity.projects.locations.addressGroups.cloneItems" call. +// Exactly one of *Operation or error will be non-nil. Any non-2xx +// status code is an error. Response headers are in either +// *Operation.ServerResponse.Header or (if a response was returned at +// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified +// to check whether the returned error was because +// http.StatusNotModified was returned. +func (c *ProjectsLocationsAddressGroupsCloneItemsCall) Do(opts ...googleapi.CallOption) (*Operation, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, gensupport.WrapError(&googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + }) + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, gensupport.WrapError(err) + } + ret := &Operation{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Clones items from one address group to another.", + // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/addressGroups/{addressGroupsId}:cloneItems", + // "httpMethod": "POST", + // "id": "networksecurity.projects.locations.addressGroups.cloneItems", + // "parameterOrder": [ + // "addressGroup" + // ], + // "parameters": { + // "addressGroup": { + // "description": "Required. A name of the AddressGroup to clone items to. Must be in the format `projects|organization/*/locations/{location}/addressGroups/*`.", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+/addressGroups/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1/{+addressGroup}:cloneItems", + // "request": { + // "$ref": "CloneAddressGroupItemsRequest" + // }, + // "response": { + // "$ref": "Operation" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "networksecurity.projects.locations.addressGroups.create": + +type ProjectsLocationsAddressGroupsCreateCall struct { + s *Service + parent string + addressgroup *AddressGroup + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Create: Creates a new address group in a given project and location. +// +// - parent: The parent resource of the AddressGroup. Must be in the +// format `projects/*/locations/{location}`. +func (r *ProjectsLocationsAddressGroupsService) Create(parent string, addressgroup *AddressGroup) *ProjectsLocationsAddressGroupsCreateCall { + c := &ProjectsLocationsAddressGroupsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + c.addressgroup = addressgroup + return c +} + +// AddressGroupId sets the optional parameter "addressGroupId": +// Required. Short name of the AddressGroup resource to be created. This +// value should be 1-63 characters long, containing only letters, +// numbers, hyphens, and underscores, and should not start with a +// number. E.g. "authz_policy". +func (c *ProjectsLocationsAddressGroupsCreateCall) AddressGroupId(addressGroupId string) *ProjectsLocationsAddressGroupsCreateCall { + c.urlParams_.Set("addressGroupId", addressGroupId) + return c +} + +// RequestId sets the optional parameter "requestId": An optional +// request ID to identify requests. Specify a unique request ID so that +// if you must retry your request, the server will know to ignore the +// request if it has already been completed. The server will guarantee +// that for at least 60 minutes since the first request. For example, +// consider a situation where you make an initial request and the +// request times out. If you make the request again with the same +// request ID, the server can check if original operation with the same +// request ID was received, and if so, will ignore the second request. +// This prevents clients from accidentally creating duplicate +// commitments. The request ID must be a valid UUID with the exception +// that zero UUID is not supported +// (00000000-0000-0000-0000-000000000000). +func (c *ProjectsLocationsAddressGroupsCreateCall) RequestId(requestId string) *ProjectsLocationsAddressGroupsCreateCall { + c.urlParams_.Set("requestId", requestId) + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *ProjectsLocationsAddressGroupsCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsAddressGroupsCreateCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *ProjectsLocationsAddressGroupsCreateCall) Context(ctx context.Context) *ProjectsLocationsAddressGroupsCreateCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *ProjectsLocationsAddressGroupsCreateCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsAddressGroupsCreateCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.addressgroup) + if err != nil { + return nil, err + } + reqHeaders.Set("Content-Type", "application/json") + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/addressGroups") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("POST", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "parent": c.parent, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "networksecurity.projects.locations.addressGroups.create" call. +// Exactly one of *Operation or error will be non-nil. Any non-2xx +// status code is an error. Response headers are in either +// *Operation.ServerResponse.Header or (if a response was returned at +// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified +// to check whether the returned error was because +// http.StatusNotModified was returned. +func (c *ProjectsLocationsAddressGroupsCreateCall) Do(opts ...googleapi.CallOption) (*Operation, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, gensupport.WrapError(&googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + }) + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, gensupport.WrapError(err) + } + ret := &Operation{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Creates a new address group in a given project and location.", + // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/addressGroups", + // "httpMethod": "POST", + // "id": "networksecurity.projects.locations.addressGroups.create", + // "parameterOrder": [ + // "parent" + // ], + // "parameters": { + // "addressGroupId": { + // "description": "Required. Short name of the AddressGroup resource to be created. This value should be 1-63 characters long, containing only letters, numbers, hyphens, and underscores, and should not start with a number. E.g. \"authz_policy\".", + // "location": "query", + // "type": "string" + // }, + // "parent": { + // "description": "Required. The parent resource of the AddressGroup. Must be in the format `projects/*/locations/{location}`.", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+$", + // "required": true, + // "type": "string" + // }, + // "requestId": { + // "description": "Optional. An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. The server will guarantee that for at least 60 minutes since the first request. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", + // "location": "query", + // "type": "string" + // } + // }, + // "path": "v1/{+parent}/addressGroups", + // "request": { + // "$ref": "AddressGroup" + // }, + // "response": { + // "$ref": "Operation" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "networksecurity.projects.locations.addressGroups.delete": + +type ProjectsLocationsAddressGroupsDeleteCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Delete: Deletes a single address group. +// +// - name: A name of the AddressGroup to delete. Must be in the format +// `projects/*/locations/{location}/addressGroups/*`. +func (r *ProjectsLocationsAddressGroupsService) Delete(name string) *ProjectsLocationsAddressGroupsDeleteCall { + c := &ProjectsLocationsAddressGroupsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + return c +} + +// RequestId sets the optional parameter "requestId": An optional +// request ID to identify requests. Specify a unique request ID so that +// if you must retry your request, the server will know to ignore the +// request if it has already been completed. The server will guarantee +// that for at least 60 minutes since the first request. For example, +// consider a situation where you make an initial request and the +// request times out. If you make the request again with the same +// request ID, the server can check if original operation with the same +// request ID was received, and if so, will ignore the second request. +// This prevents clients from accidentally creating duplicate +// commitments. The request ID must be a valid UUID with the exception +// that zero UUID is not supported +// (00000000-0000-0000-0000-000000000000). +func (c *ProjectsLocationsAddressGroupsDeleteCall) RequestId(requestId string) *ProjectsLocationsAddressGroupsDeleteCall { + c.urlParams_.Set("requestId", requestId) + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *ProjectsLocationsAddressGroupsDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsAddressGroupsDeleteCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *ProjectsLocationsAddressGroupsDeleteCall) Context(ctx context.Context) *ProjectsLocationsAddressGroupsDeleteCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *ProjectsLocationsAddressGroupsDeleteCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsAddressGroupsDeleteCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + var body io.Reader = nil + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("DELETE", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "name": c.name, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "networksecurity.projects.locations.addressGroups.delete" call. +// Exactly one of *Operation or error will be non-nil. Any non-2xx +// status code is an error. Response headers are in either +// *Operation.ServerResponse.Header or (if a response was returned at +// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified +// to check whether the returned error was because +// http.StatusNotModified was returned. +func (c *ProjectsLocationsAddressGroupsDeleteCall) Do(opts ...googleapi.CallOption) (*Operation, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, gensupport.WrapError(&googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + }) + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, gensupport.WrapError(err) + } + ret := &Operation{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Deletes a single address group.", + // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/addressGroups/{addressGroupsId}", + // "httpMethod": "DELETE", + // "id": "networksecurity.projects.locations.addressGroups.delete", + // "parameterOrder": [ + // "name" + // ], + // "parameters": { + // "name": { + // "description": "Required. A name of the AddressGroup to delete. Must be in the format `projects/*/locations/{location}/addressGroups/*`.", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+/addressGroups/[^/]+$", + // "required": true, + // "type": "string" + // }, + // "requestId": { + // "description": "Optional. An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. The server will guarantee that for at least 60 minutes since the first request. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", + // "location": "query", + // "type": "string" + // } + // }, + // "path": "v1/{+name}", + // "response": { + // "$ref": "Operation" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "networksecurity.projects.locations.addressGroups.get": + +type ProjectsLocationsAddressGroupsGetCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// Get: Gets details of a single address group. +// +// - name: A name of the AddressGroup to get. Must be in the format +// `projects/*/locations/{location}/addressGroups/*`. +func (r *ProjectsLocationsAddressGroupsService) Get(name string) *ProjectsLocationsAddressGroupsGetCall { + c := &ProjectsLocationsAddressGroupsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *ProjectsLocationsAddressGroupsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsAddressGroupsGetCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// IfNoneMatch sets the optional parameter which makes the operation +// fail if the object's ETag matches the given value. This is useful for +// getting updates only after the object has changed since the last +// request. Use googleapi.IsNotModified to check whether the response +// error from Do is the result of In-None-Match. +func (c *ProjectsLocationsAddressGroupsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsAddressGroupsGetCall { + c.ifNoneMatch_ = entityTag + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *ProjectsLocationsAddressGroupsGetCall) Context(ctx context.Context) *ProjectsLocationsAddressGroupsGetCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *ProjectsLocationsAddressGroupsGetCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsAddressGroupsGetCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) + } + var body io.Reader = nil + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("GET", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "name": c.name, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "networksecurity.projects.locations.addressGroups.get" call. +// Exactly one of *AddressGroup or error will be non-nil. Any non-2xx +// status code is an error. Response headers are in either +// *AddressGroup.ServerResponse.Header or (if a response was returned at +// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified +// to check whether the returned error was because +// http.StatusNotModified was returned. +func (c *ProjectsLocationsAddressGroupsGetCall) Do(opts ...googleapi.CallOption) (*AddressGroup, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, gensupport.WrapError(&googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + }) + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, gensupport.WrapError(err) + } + ret := &AddressGroup{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Gets details of a single address group.", + // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/addressGroups/{addressGroupsId}", + // "httpMethod": "GET", + // "id": "networksecurity.projects.locations.addressGroups.get", + // "parameterOrder": [ + // "name" + // ], + // "parameters": { + // "name": { + // "description": "Required. A name of the AddressGroup to get. Must be in the format `projects/*/locations/{location}/addressGroups/*`.", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+/addressGroups/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1/{+name}", + // "response": { + // "$ref": "AddressGroup" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "networksecurity.projects.locations.addressGroups.getIamPolicy": + +type ProjectsLocationsAddressGroupsGetIamPolicyCall struct { + s *Service + resource string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// GetIamPolicy: Gets the access control policy for a resource. Returns +// an empty policy if the resource exists and does not have a policy +// set. +// +// - resource: REQUIRED: The resource for which the policy is being +// requested. See Resource names +// (https://cloud.google.com/apis/design/resource_names) for the +// appropriate value for this field. +func (r *ProjectsLocationsAddressGroupsService) GetIamPolicy(resource string) *ProjectsLocationsAddressGroupsGetIamPolicyCall { + c := &ProjectsLocationsAddressGroupsGetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.resource = resource + return c +} + +// OptionsRequestedPolicyVersion sets the optional parameter +// "options.requestedPolicyVersion": The maximum policy version that +// will be used to format the policy. Valid values are 0, 1, and 3. +// Requests specifying an invalid value will be rejected. Requests for +// policies with any conditional role bindings must specify version 3. +// Policies with no conditional role bindings may specify any valid +// value or leave the field unset. The policy in the response might use +// the policy version that you specified, or it might use a lower policy +// version. For example, if you specify version 3, but the policy has no +// conditional role bindings, the response uses version 1. To learn +// which resources support conditions in their IAM policies, see the IAM +// documentation +// (https://cloud.google.com/iam/help/conditions/resource-policies). +func (c *ProjectsLocationsAddressGroupsGetIamPolicyCall) OptionsRequestedPolicyVersion(optionsRequestedPolicyVersion int64) *ProjectsLocationsAddressGroupsGetIamPolicyCall { + c.urlParams_.Set("options.requestedPolicyVersion", fmt.Sprint(optionsRequestedPolicyVersion)) + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *ProjectsLocationsAddressGroupsGetIamPolicyCall) Fields(s ...googleapi.Field) *ProjectsLocationsAddressGroupsGetIamPolicyCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// IfNoneMatch sets the optional parameter which makes the operation +// fail if the object's ETag matches the given value. This is useful for +// getting updates only after the object has changed since the last +// request. Use googleapi.IsNotModified to check whether the response +// error from Do is the result of In-None-Match. +func (c *ProjectsLocationsAddressGroupsGetIamPolicyCall) IfNoneMatch(entityTag string) *ProjectsLocationsAddressGroupsGetIamPolicyCall { + c.ifNoneMatch_ = entityTag + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *ProjectsLocationsAddressGroupsGetIamPolicyCall) Context(ctx context.Context) *ProjectsLocationsAddressGroupsGetIamPolicyCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *ProjectsLocationsAddressGroupsGetIamPolicyCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsAddressGroupsGetIamPolicyCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) + } + var body io.Reader = nil + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+resource}:getIamPolicy") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("GET", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "resource": c.resource, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "networksecurity.projects.locations.addressGroups.getIamPolicy" call. +// Exactly one of *GoogleIamV1Policy or error will be non-nil. Any +// non-2xx status code is an error. Response headers are in either +// *GoogleIamV1Policy.ServerResponse.Header or (if a response was +// returned at all) in error.(*googleapi.Error).Header. Use +// googleapi.IsNotModified to check whether the returned error was +// because http.StatusNotModified was returned. +func (c *ProjectsLocationsAddressGroupsGetIamPolicyCall) Do(opts ...googleapi.CallOption) (*GoogleIamV1Policy, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, gensupport.WrapError(&googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + }) + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, gensupport.WrapError(err) + } + ret := &GoogleIamV1Policy{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Gets the access control policy for a resource. Returns an empty policy if the resource exists and does not have a policy set.", + // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/addressGroups/{addressGroupsId}:getIamPolicy", + // "httpMethod": "GET", + // "id": "networksecurity.projects.locations.addressGroups.getIamPolicy", + // "parameterOrder": [ + // "resource" + // ], + // "parameters": { + // "options.requestedPolicyVersion": { + // "description": "Optional. The maximum policy version that will be used to format the policy. Valid values are 0, 1, and 3. Requests specifying an invalid value will be rejected. Requests for policies with any conditional role bindings must specify version 3. Policies with no conditional role bindings may specify any valid value or leave the field unset. The policy in the response might use the policy version that you specified, or it might use a lower policy version. For example, if you specify version 3, but the policy has no conditional role bindings, the response uses version 1. To learn which resources support conditions in their IAM policies, see the [IAM documentation](https://cloud.google.com/iam/help/conditions/resource-policies).", + // "format": "int32", + // "location": "query", + // "type": "integer" + // }, + // "resource": { + // "description": "REQUIRED: The resource for which the policy is being requested. See [Resource names](https://cloud.google.com/apis/design/resource_names) for the appropriate value for this field.", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+/addressGroups/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1/{+resource}:getIamPolicy", + // "response": { + // "$ref": "GoogleIamV1Policy" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "networksecurity.projects.locations.addressGroups.list": + +type ProjectsLocationsAddressGroupsListCall struct { + s *Service + parent string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// List: Lists address groups in a given project and location. +// +// - parent: The project and location from which the AddressGroups +// should be listed, specified in the format +// `projects/*/locations/{location}`. +func (r *ProjectsLocationsAddressGroupsService) List(parent string) *ProjectsLocationsAddressGroupsListCall { + c := &ProjectsLocationsAddressGroupsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + return c +} + +// PageSize sets the optional parameter "pageSize": Maximum number of +// AddressGroups to return per call. +func (c *ProjectsLocationsAddressGroupsListCall) PageSize(pageSize int64) *ProjectsLocationsAddressGroupsListCall { + c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) + return c +} + +// PageToken sets the optional parameter "pageToken": The value returned +// by the last `ListAddressGroupsResponse` Indicates that this is a +// continuation of a prior `ListAddressGroups` call, and that the system +// should return the next page of data. +func (c *ProjectsLocationsAddressGroupsListCall) PageToken(pageToken string) *ProjectsLocationsAddressGroupsListCall { + c.urlParams_.Set("pageToken", pageToken) + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *ProjectsLocationsAddressGroupsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsAddressGroupsListCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// IfNoneMatch sets the optional parameter which makes the operation +// fail if the object's ETag matches the given value. This is useful for +// getting updates only after the object has changed since the last +// request. Use googleapi.IsNotModified to check whether the response +// error from Do is the result of In-None-Match. +func (c *ProjectsLocationsAddressGroupsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsAddressGroupsListCall { + c.ifNoneMatch_ = entityTag + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *ProjectsLocationsAddressGroupsListCall) Context(ctx context.Context) *ProjectsLocationsAddressGroupsListCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *ProjectsLocationsAddressGroupsListCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsAddressGroupsListCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) + } + var body io.Reader = nil + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/addressGroups") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("GET", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "parent": c.parent, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "networksecurity.projects.locations.addressGroups.list" call. +// Exactly one of *ListAddressGroupsResponse or error will be non-nil. +// Any non-2xx status code is an error. Response headers are in either +// *ListAddressGroupsResponse.ServerResponse.Header or (if a response +// was returned at all) in error.(*googleapi.Error).Header. Use +// googleapi.IsNotModified to check whether the returned error was +// because http.StatusNotModified was returned. +func (c *ProjectsLocationsAddressGroupsListCall) Do(opts ...googleapi.CallOption) (*ListAddressGroupsResponse, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, gensupport.WrapError(&googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + }) + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, gensupport.WrapError(err) + } + ret := &ListAddressGroupsResponse{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Lists address groups in a given project and location.", + // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/addressGroups", + // "httpMethod": "GET", + // "id": "networksecurity.projects.locations.addressGroups.list", + // "parameterOrder": [ + // "parent" + // ], + // "parameters": { + // "pageSize": { + // "description": "Maximum number of AddressGroups to return per call.", + // "format": "int32", + // "location": "query", + // "type": "integer" + // }, + // "pageToken": { + // "description": "The value returned by the last `ListAddressGroupsResponse` Indicates that this is a continuation of a prior `ListAddressGroups` call, and that the system should return the next page of data.", + // "location": "query", + // "type": "string" + // }, + // "parent": { + // "description": "Required. The project and location from which the AddressGroups should be listed, specified in the format `projects/*/locations/{location}`.", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1/{+parent}/addressGroups", + // "response": { + // "$ref": "ListAddressGroupsResponse" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// Pages invokes f for each page of results. +// A non-nil error returned from f will halt the iteration. +// The provided context supersedes any context provided to the Context method. +func (c *ProjectsLocationsAddressGroupsListCall) Pages(ctx context.Context, f func(*ListAddressGroupsResponse) error) error { + c.ctx_ = ctx + defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point + for { + x, err := c.Do() + if err != nil { + return err + } + if err := f(x); err != nil { + return err + } + if x.NextPageToken == "" { + return nil + } + c.PageToken(x.NextPageToken) + } +} + +// method id "networksecurity.projects.locations.addressGroups.listReferences": + +type ProjectsLocationsAddressGroupsListReferencesCall struct { + s *Service + addressGroup string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// ListReferences: Lists references of an address group. +// +// - addressGroup: A name of the AddressGroup to clone items to. Must be +// in the format +// `projects|organization/*/locations/{location}/addressGroups/*`. +func (r *ProjectsLocationsAddressGroupsService) ListReferences(addressGroup string) *ProjectsLocationsAddressGroupsListReferencesCall { + c := &ProjectsLocationsAddressGroupsListReferencesCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.addressGroup = addressGroup + return c +} + +// PageSize sets the optional parameter "pageSize": The maximum number +// of references to return. If unspecified, server will pick an +// appropriate default. Server may return fewer items than requested. A +// caller should only rely on response's next_page_token to determine if +// there are more AddressGroupUsers left to be queried. +func (c *ProjectsLocationsAddressGroupsListReferencesCall) PageSize(pageSize int64) *ProjectsLocationsAddressGroupsListReferencesCall { + c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) + return c +} + +// PageToken sets the optional parameter "pageToken": The +// next_page_token value returned from a previous List request, if any. +func (c *ProjectsLocationsAddressGroupsListReferencesCall) PageToken(pageToken string) *ProjectsLocationsAddressGroupsListReferencesCall { + c.urlParams_.Set("pageToken", pageToken) + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *ProjectsLocationsAddressGroupsListReferencesCall) Fields(s ...googleapi.Field) *ProjectsLocationsAddressGroupsListReferencesCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// IfNoneMatch sets the optional parameter which makes the operation +// fail if the object's ETag matches the given value. This is useful for +// getting updates only after the object has changed since the last +// request. Use googleapi.IsNotModified to check whether the response +// error from Do is the result of In-None-Match. +func (c *ProjectsLocationsAddressGroupsListReferencesCall) IfNoneMatch(entityTag string) *ProjectsLocationsAddressGroupsListReferencesCall { + c.ifNoneMatch_ = entityTag + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *ProjectsLocationsAddressGroupsListReferencesCall) Context(ctx context.Context) *ProjectsLocationsAddressGroupsListReferencesCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *ProjectsLocationsAddressGroupsListReferencesCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsAddressGroupsListReferencesCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) + } + var body io.Reader = nil + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+addressGroup}:listReferences") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("GET", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "addressGroup": c.addressGroup, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "networksecurity.projects.locations.addressGroups.listReferences" call. +// Exactly one of *ListAddressGroupReferencesResponse or error will be +// non-nil. Any non-2xx status code is an error. Response headers are in +// either *ListAddressGroupReferencesResponse.ServerResponse.Header or +// (if a response was returned at all) in +// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check +// whether the returned error was because http.StatusNotModified was +// returned. +func (c *ProjectsLocationsAddressGroupsListReferencesCall) Do(opts ...googleapi.CallOption) (*ListAddressGroupReferencesResponse, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, gensupport.WrapError(&googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + }) + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, gensupport.WrapError(err) + } + ret := &ListAddressGroupReferencesResponse{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Lists references of an address group.", + // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/addressGroups/{addressGroupsId}:listReferences", + // "httpMethod": "GET", + // "id": "networksecurity.projects.locations.addressGroups.listReferences", + // "parameterOrder": [ + // "addressGroup" + // ], + // "parameters": { + // "addressGroup": { + // "description": "Required. A name of the AddressGroup to clone items to. Must be in the format `projects|organization/*/locations/{location}/addressGroups/*`.", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+/addressGroups/[^/]+$", + // "required": true, + // "type": "string" + // }, + // "pageSize": { + // "description": "The maximum number of references to return. If unspecified, server will pick an appropriate default. Server may return fewer items than requested. A caller should only rely on response's next_page_token to determine if there are more AddressGroupUsers left to be queried.", + // "format": "int32", + // "location": "query", + // "type": "integer" + // }, + // "pageToken": { + // "description": "The next_page_token value returned from a previous List request, if any.", + // "location": "query", + // "type": "string" + // } + // }, + // "path": "v1/{+addressGroup}:listReferences", + // "response": { + // "$ref": "ListAddressGroupReferencesResponse" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// Pages invokes f for each page of results. +// A non-nil error returned from f will halt the iteration. +// The provided context supersedes any context provided to the Context method. +func (c *ProjectsLocationsAddressGroupsListReferencesCall) Pages(ctx context.Context, f func(*ListAddressGroupReferencesResponse) error) error { + c.ctx_ = ctx + defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point + for { + x, err := c.Do() + if err != nil { + return err + } if err := f(x); err != nil { return err } - if x.NextPageToken == "" { - return nil + if x.NextPageToken == "" { + return nil + } + c.PageToken(x.NextPageToken) + } +} + +// method id "networksecurity.projects.locations.addressGroups.patch": + +type ProjectsLocationsAddressGroupsPatchCall struct { + s *Service + name string + addressgroup *AddressGroup + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Patch: Updates the parameters of a single address group. +// +// - name: Name of the AddressGroup resource. It matches pattern +// `projects/*/locations/{location}/addressGroups/`. +func (r *ProjectsLocationsAddressGroupsService) Patch(name string, addressgroup *AddressGroup) *ProjectsLocationsAddressGroupsPatchCall { + c := &ProjectsLocationsAddressGroupsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + c.addressgroup = addressgroup + return c +} + +// RequestId sets the optional parameter "requestId": An optional +// request ID to identify requests. Specify a unique request ID so that +// if you must retry your request, the server will know to ignore the +// request if it has already been completed. The server will guarantee +// that for at least 60 minutes since the first request. For example, +// consider a situation where you make an initial request and the +// request times out. If you make the request again with the same +// request ID, the server can check if original operation with the same +// request ID was received, and if so, will ignore the second request. +// This prevents clients from accidentally creating duplicate +// commitments. The request ID must be a valid UUID with the exception +// that zero UUID is not supported +// (00000000-0000-0000-0000-000000000000). +func (c *ProjectsLocationsAddressGroupsPatchCall) RequestId(requestId string) *ProjectsLocationsAddressGroupsPatchCall { + c.urlParams_.Set("requestId", requestId) + return c +} + +// UpdateMask sets the optional parameter "updateMask": Field mask is +// used to specify the fields to be overwritten in the AddressGroup +// resource by the update. The fields specified in the update_mask are +// relative to the resource, not the full request. A field will be +// overwritten if it is in the mask. If the user does not provide a mask +// then all fields will be overwritten. +func (c *ProjectsLocationsAddressGroupsPatchCall) UpdateMask(updateMask string) *ProjectsLocationsAddressGroupsPatchCall { + c.urlParams_.Set("updateMask", updateMask) + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *ProjectsLocationsAddressGroupsPatchCall) Fields(s ...googleapi.Field) *ProjectsLocationsAddressGroupsPatchCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *ProjectsLocationsAddressGroupsPatchCall) Context(ctx context.Context) *ProjectsLocationsAddressGroupsPatchCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *ProjectsLocationsAddressGroupsPatchCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsAddressGroupsPatchCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.addressgroup) + if err != nil { + return nil, err + } + reqHeaders.Set("Content-Type", "application/json") + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("PATCH", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "name": c.name, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "networksecurity.projects.locations.addressGroups.patch" call. +// Exactly one of *Operation or error will be non-nil. Any non-2xx +// status code is an error. Response headers are in either +// *Operation.ServerResponse.Header or (if a response was returned at +// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified +// to check whether the returned error was because +// http.StatusNotModified was returned. +func (c *ProjectsLocationsAddressGroupsPatchCall) Do(opts ...googleapi.CallOption) (*Operation, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, gensupport.WrapError(&googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + }) + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, gensupport.WrapError(err) + } + ret := &Operation{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Updates the parameters of a single address group.", + // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/addressGroups/{addressGroupsId}", + // "httpMethod": "PATCH", + // "id": "networksecurity.projects.locations.addressGroups.patch", + // "parameterOrder": [ + // "name" + // ], + // "parameters": { + // "name": { + // "description": "Required. Name of the AddressGroup resource. It matches pattern `projects/*/locations/{location}/addressGroups/`.", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+/addressGroups/[^/]+$", + // "required": true, + // "type": "string" + // }, + // "requestId": { + // "description": "Optional. An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. The server will guarantee that for at least 60 minutes since the first request. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", + // "location": "query", + // "type": "string" + // }, + // "updateMask": { + // "description": "Optional. Field mask is used to specify the fields to be overwritten in the AddressGroup resource by the update. The fields specified in the update_mask are relative to the resource, not the full request. A field will be overwritten if it is in the mask. If the user does not provide a mask then all fields will be overwritten.", + // "format": "google-fieldmask", + // "location": "query", + // "type": "string" + // } + // }, + // "path": "v1/{+name}", + // "request": { + // "$ref": "AddressGroup" + // }, + // "response": { + // "$ref": "Operation" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "networksecurity.projects.locations.addressGroups.removeItems": + +type ProjectsLocationsAddressGroupsRemoveItemsCall struct { + s *Service + addressGroup string + removeaddressgroupitemsrequest *RemoveAddressGroupItemsRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// RemoveItems: Removes items from an address group. +// +// - addressGroup: A name of the AddressGroup to remove items from. Must +// be in the format +// `projects|organization/*/locations/{location}/addressGroups/*`. +func (r *ProjectsLocationsAddressGroupsService) RemoveItems(addressGroup string, removeaddressgroupitemsrequest *RemoveAddressGroupItemsRequest) *ProjectsLocationsAddressGroupsRemoveItemsCall { + c := &ProjectsLocationsAddressGroupsRemoveItemsCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.addressGroup = addressGroup + c.removeaddressgroupitemsrequest = removeaddressgroupitemsrequest + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *ProjectsLocationsAddressGroupsRemoveItemsCall) Fields(s ...googleapi.Field) *ProjectsLocationsAddressGroupsRemoveItemsCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *ProjectsLocationsAddressGroupsRemoveItemsCall) Context(ctx context.Context) *ProjectsLocationsAddressGroupsRemoveItemsCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *ProjectsLocationsAddressGroupsRemoveItemsCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsAddressGroupsRemoveItemsCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.removeaddressgroupitemsrequest) + if err != nil { + return nil, err + } + reqHeaders.Set("Content-Type", "application/json") + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+addressGroup}:removeItems") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("POST", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "addressGroup": c.addressGroup, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "networksecurity.projects.locations.addressGroups.removeItems" call. +// Exactly one of *Operation or error will be non-nil. Any non-2xx +// status code is an error. Response headers are in either +// *Operation.ServerResponse.Header or (if a response was returned at +// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified +// to check whether the returned error was because +// http.StatusNotModified was returned. +func (c *ProjectsLocationsAddressGroupsRemoveItemsCall) Do(opts ...googleapi.CallOption) (*Operation, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, gensupport.WrapError(&googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + }) + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, gensupport.WrapError(err) + } + ret := &Operation{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Removes items from an address group.", + // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/addressGroups/{addressGroupsId}:removeItems", + // "httpMethod": "POST", + // "id": "networksecurity.projects.locations.addressGroups.removeItems", + // "parameterOrder": [ + // "addressGroup" + // ], + // "parameters": { + // "addressGroup": { + // "description": "Required. A name of the AddressGroup to remove items from. Must be in the format `projects|organization/*/locations/{location}/addressGroups/*`.", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+/addressGroups/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1/{+addressGroup}:removeItems", + // "request": { + // "$ref": "RemoveAddressGroupItemsRequest" + // }, + // "response": { + // "$ref": "Operation" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "networksecurity.projects.locations.addressGroups.setIamPolicy": + +type ProjectsLocationsAddressGroupsSetIamPolicyCall struct { + s *Service + resource string + googleiamv1setiampolicyrequest *GoogleIamV1SetIamPolicyRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// SetIamPolicy: Sets the access control policy on the specified +// resource. Replaces any existing policy. Can return `NOT_FOUND`, +// `INVALID_ARGUMENT`, and `PERMISSION_DENIED` errors. +// +// - resource: REQUIRED: The resource for which the policy is being +// specified. See Resource names +// (https://cloud.google.com/apis/design/resource_names) for the +// appropriate value for this field. +func (r *ProjectsLocationsAddressGroupsService) SetIamPolicy(resource string, googleiamv1setiampolicyrequest *GoogleIamV1SetIamPolicyRequest) *ProjectsLocationsAddressGroupsSetIamPolicyCall { + c := &ProjectsLocationsAddressGroupsSetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.resource = resource + c.googleiamv1setiampolicyrequest = googleiamv1setiampolicyrequest + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *ProjectsLocationsAddressGroupsSetIamPolicyCall) Fields(s ...googleapi.Field) *ProjectsLocationsAddressGroupsSetIamPolicyCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *ProjectsLocationsAddressGroupsSetIamPolicyCall) Context(ctx context.Context) *ProjectsLocationsAddressGroupsSetIamPolicyCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *ProjectsLocationsAddressGroupsSetIamPolicyCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsAddressGroupsSetIamPolicyCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleiamv1setiampolicyrequest) + if err != nil { + return nil, err + } + reqHeaders.Set("Content-Type", "application/json") + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+resource}:setIamPolicy") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("POST", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "resource": c.resource, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "networksecurity.projects.locations.addressGroups.setIamPolicy" call. +// Exactly one of *GoogleIamV1Policy or error will be non-nil. Any +// non-2xx status code is an error. Response headers are in either +// *GoogleIamV1Policy.ServerResponse.Header or (if a response was +// returned at all) in error.(*googleapi.Error).Header. Use +// googleapi.IsNotModified to check whether the returned error was +// because http.StatusNotModified was returned. +func (c *ProjectsLocationsAddressGroupsSetIamPolicyCall) Do(opts ...googleapi.CallOption) (*GoogleIamV1Policy, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, gensupport.WrapError(&googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + }) + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, gensupport.WrapError(err) + } + ret := &GoogleIamV1Policy{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Sets the access control policy on the specified resource. Replaces any existing policy. Can return `NOT_FOUND`, `INVALID_ARGUMENT`, and `PERMISSION_DENIED` errors.", + // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/addressGroups/{addressGroupsId}:setIamPolicy", + // "httpMethod": "POST", + // "id": "networksecurity.projects.locations.addressGroups.setIamPolicy", + // "parameterOrder": [ + // "resource" + // ], + // "parameters": { + // "resource": { + // "description": "REQUIRED: The resource for which the policy is being specified. See [Resource names](https://cloud.google.com/apis/design/resource_names) for the appropriate value for this field.", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+/addressGroups/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1/{+resource}:setIamPolicy", + // "request": { + // "$ref": "GoogleIamV1SetIamPolicyRequest" + // }, + // "response": { + // "$ref": "GoogleIamV1Policy" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "networksecurity.projects.locations.addressGroups.testIamPermissions": + +type ProjectsLocationsAddressGroupsTestIamPermissionsCall struct { + s *Service + resource string + googleiamv1testiampermissionsrequest *GoogleIamV1TestIamPermissionsRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// TestIamPermissions: Returns permissions that a caller has on the +// specified resource. If the resource does not exist, this will return +// an empty set of permissions, not a `NOT_FOUND` error. Note: This +// operation is designed to be used for building permission-aware UIs +// and command-line tools, not for authorization checking. This +// operation may "fail open" without warning. +// +// - resource: REQUIRED: The resource for which the policy detail is +// being requested. See Resource names +// (https://cloud.google.com/apis/design/resource_names) for the +// appropriate value for this field. +func (r *ProjectsLocationsAddressGroupsService) TestIamPermissions(resource string, googleiamv1testiampermissionsrequest *GoogleIamV1TestIamPermissionsRequest) *ProjectsLocationsAddressGroupsTestIamPermissionsCall { + c := &ProjectsLocationsAddressGroupsTestIamPermissionsCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.resource = resource + c.googleiamv1testiampermissionsrequest = googleiamv1testiampermissionsrequest + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *ProjectsLocationsAddressGroupsTestIamPermissionsCall) Fields(s ...googleapi.Field) *ProjectsLocationsAddressGroupsTestIamPermissionsCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *ProjectsLocationsAddressGroupsTestIamPermissionsCall) Context(ctx context.Context) *ProjectsLocationsAddressGroupsTestIamPermissionsCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *ProjectsLocationsAddressGroupsTestIamPermissionsCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsAddressGroupsTestIamPermissionsCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleiamv1testiampermissionsrequest) + if err != nil { + return nil, err + } + reqHeaders.Set("Content-Type", "application/json") + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+resource}:testIamPermissions") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("POST", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "resource": c.resource, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "networksecurity.projects.locations.addressGroups.testIamPermissions" call. +// Exactly one of *GoogleIamV1TestIamPermissionsResponse or error will +// be non-nil. Any non-2xx status code is an error. Response headers are +// in either +// *GoogleIamV1TestIamPermissionsResponse.ServerResponse.Header or (if a +// response was returned at all) in error.(*googleapi.Error).Header. Use +// googleapi.IsNotModified to check whether the returned error was +// because http.StatusNotModified was returned. +func (c *ProjectsLocationsAddressGroupsTestIamPermissionsCall) Do(opts ...googleapi.CallOption) (*GoogleIamV1TestIamPermissionsResponse, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() } - c.PageToken(x.NextPageToken) + return nil, gensupport.WrapError(&googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + }) + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, gensupport.WrapError(err) + } + ret := &GoogleIamV1TestIamPermissionsResponse{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err } + return ret, nil + // { + // "description": "Returns permissions that a caller has on the specified resource. If the resource does not exist, this will return an empty set of permissions, not a `NOT_FOUND` error. Note: This operation is designed to be used for building permission-aware UIs and command-line tools, not for authorization checking. This operation may \"fail open\" without warning.", + // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/addressGroups/{addressGroupsId}:testIamPermissions", + // "httpMethod": "POST", + // "id": "networksecurity.projects.locations.addressGroups.testIamPermissions", + // "parameterOrder": [ + // "resource" + // ], + // "parameters": { + // "resource": { + // "description": "REQUIRED: The resource for which the policy detail is being requested. See [Resource names](https://cloud.google.com/apis/design/resource_names) for the appropriate value for this field.", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+/addressGroups/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1/{+resource}:testIamPermissions", + // "request": { + // "$ref": "GoogleIamV1TestIamPermissionsRequest" + // }, + // "response": { + // "$ref": "GoogleIamV1TestIamPermissionsResponse" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + } // method id "networksecurity.projects.locations.authorizationPolicies.create": diff --git a/workflows/v1/workflows-api.json b/workflows/v1/workflows-api.json index 7110172631a..a2409424fd6 100644 --- a/workflows/v1/workflows-api.json +++ b/workflows/v1/workflows-api.json @@ -349,7 +349,7 @@ "type": "string" }, "revisionId": { - "description": "Optional. Optional. The revision of the workflow to retrieve. If the revision_id is empty, the latest revision is retrieved. The format is \"000001-a4d\", where the first 6 characters define the zero-padded decimal revision number. They are followed by a hyphen and 3 hexadecimal characters. (go/wf_adr_clh_1)", + "description": "Optional. The revision of the workflow to retrieve. If the revision_id is empty, the latest revision is retrieved. The format is \"000001-a4d\", where the first six characters define the zero-padded decimal revision number. They are followed by a hyphen and three hexadecimal characters.", "location": "query", "type": "string" } @@ -449,7 +449,7 @@ } } }, - "revision": "20230426", + "revision": "20230510", "rootUrl": "https://workflows.googleapis.com/", "schemas": { "Empty": { @@ -719,7 +719,7 @@ "type": "string" }, "revisionId": { - "description": "Output only. The revision of the workflow. A new revision of a workflow is created as a result of updating the following properties of a workflow: - Service account - Workflow code to be executed The format is \"000001-a4d\", where the first 6 characters define the zero-padded revision ordinal number. They are followed by a hyphen and 3 hexadecimal random characters.", + "description": "Output only. The revision of the workflow. A new revision of a workflow is created as a result of updating the following properties of a workflow: - Service account - Workflow code to be executed The format is \"000001-a4d\", where the first six characters define the zero-padded revision ordinal number. They are followed by a hyphen and three hexadecimal random characters.", "readOnly": true, "type": "string" }, diff --git a/workflows/v1/workflows-gen.go b/workflows/v1/workflows-gen.go index 4ce91c2c3c2..2781d6aa9b8 100644 --- a/workflows/v1/workflows-gen.go +++ b/workflows/v1/workflows-gen.go @@ -592,9 +592,9 @@ type Workflow struct { // RevisionId: Output only. The revision of the workflow. A new revision // of a workflow is created as a result of updating the following // properties of a workflow: - Service account - Workflow code to be - // executed The format is "000001-a4d", where the first 6 characters + // executed The format is "000001-a4d", where the first six characters // define the zero-padded revision ordinal number. They are followed by - // a hyphen and 3 hexadecimal random characters. + // a hyphen and three hexadecimal random characters. RevisionId string `json:"revisionId,omitempty"` // ServiceAccount: The service account associated with the latest @@ -1820,12 +1820,11 @@ func (r *ProjectsLocationsWorkflowsService) Get(name string) *ProjectsLocationsW return c } -// RevisionId sets the optional parameter "revisionId": Optional. The -// revision of the workflow to retrieve. If the revision_id is empty, -// the latest revision is retrieved. The format is "000001-a4d", where -// the first 6 characters define the zero-padded decimal revision -// number. They are followed by a hyphen and 3 hexadecimal characters. -// (go/wf_adr_clh_1) +// RevisionId sets the optional parameter "revisionId": The revision of +// the workflow to retrieve. If the revision_id is empty, the latest +// revision is retrieved. The format is "000001-a4d", where the first +// six characters define the zero-padded decimal revision number. They +// are followed by a hyphen and three hexadecimal characters. func (c *ProjectsLocationsWorkflowsGetCall) RevisionId(revisionId string) *ProjectsLocationsWorkflowsGetCall { c.urlParams_.Set("revisionId", revisionId) return c @@ -1946,7 +1945,7 @@ func (c *ProjectsLocationsWorkflowsGetCall) Do(opts ...googleapi.CallOption) (*W // "type": "string" // }, // "revisionId": { - // "description": "Optional. Optional. The revision of the workflow to retrieve. If the revision_id is empty, the latest revision is retrieved. The format is \"000001-a4d\", where the first 6 characters define the zero-padded decimal revision number. They are followed by a hyphen and 3 hexadecimal characters. (go/wf_adr_clh_1)", + // "description": "Optional. The revision of the workflow to retrieve. If the revision_id is empty, the latest revision is retrieved. The format is \"000001-a4d\", where the first six characters define the zero-padded decimal revision number. They are followed by a hyphen and three hexadecimal characters.", // "location": "query", // "type": "string" // } diff --git a/workstations/v1beta/workstations-api.json b/workstations/v1beta/workstations-api.json index 001515e2d5d..c1c78590d27 100644 --- a/workstations/v1beta/workstations-api.json +++ b/workstations/v1beta/workstations-api.json @@ -12,7 +12,7 @@ "baseUrl": "https://workstations.googleapis.com/", "batchPath": "batch", "canonicalName": "Cloud Workstations", - "description": "", + "description": "Allows administrators to create managed developer environments in the cloud. ", "discoveryVersion": "v1", "documentationLink": "https://cloud.google.com/workstations", "fullyEncodeReservedExpansion": true, @@ -1127,7 +1127,7 @@ } } }, - "revision": "20230501", + "revision": "20230510", "rootUrl": "https://workstations.googleapis.com/", "schemas": { "Accelerator": { @@ -1268,7 +1268,7 @@ "id": "CustomerEncryptionKey", "properties": { "kmsKey": { - "description": "Immutable. The name of the Google Cloud KMS encryption key. For example, `projects/PROJECT_ID/locations/REGION/keyRings/KEY_RING/cryptoKeys/KEY_NAME`.", + "description": "Immutable. The name of the Google Cloud KMS encryption key. For example, `projects/PROJECT_ID/locations/REGION/keyRings/KEY_RING/cryptoKeys/KEY_NAME`. The key must be in the same region as the workstation configuration.", "type": "string" }, "kmsKeyServiceAccount": { diff --git a/workstations/v1beta/workstations-gen.go b/workstations/v1beta/workstations-gen.go index 7ff45ae9d57..d888c5983e4 100644 --- a/workstations/v1beta/workstations-gen.go +++ b/workstations/v1beta/workstations-gen.go @@ -472,7 +472,8 @@ type CustomerEncryptionKey struct { // KmsKey: Immutable. The name of the Google Cloud KMS encryption key. // For example, // `projects/PROJECT_ID/locations/REGION/keyRings/KEY_RING/cryptoKeys/KEY - // _NAME`. + // _NAME`. The key must be in the same region as the workstation + // configuration. KmsKey string `json:"kmsKey,omitempty"` // KmsKeyServiceAccount: Immutable. The service account to use with the