diff --git a/container/v1beta1/container-api.json b/container/v1beta1/container-api.json index 38a713912ae..aa465fbdc00 100644 --- a/container/v1beta1/container-api.json +++ b/container/v1beta1/container-api.json @@ -2484,7 +2484,7 @@ } } }, - "revision": "20220429", + "revision": "20220518", "rootUrl": "https://container.googleapis.com/", "schemas": { "AcceleratorConfig": { @@ -2503,6 +2503,15 @@ "gpuPartitionSize": { "description": "Size of partitions to create on the GPU. Valid values are described in the NVIDIA [mig user guide](https://docs.nvidia.com/datacenter/tesla/mig-user-guide/#partitioning).", "type": "string" + }, + "gpuSharingConfig": { + "$ref": "GPUSharingConfig", + "description": "The configuration for GPU sharing options." + }, + "maxTimeSharedClientsPerGpu": { + "description": "The number of time-shared GPU resources to expose for each physical GPU.", + "format": "int64", + "type": "string" } }, "type": "object" @@ -3650,6 +3659,30 @@ }, "type": "object" }, + "GPUSharingConfig": { + "description": "GPUSharingConfig represents the GPU sharing configuration for Hardware Accelerators.", + "id": "GPUSharingConfig", + "properties": { + "gpuSharingStrategy": { + "description": "The type of GPU sharing strategy to enable on the GPU node.", + "enum": [ + "GPU_SHARING_STRATEGY_UNSPECIFIED", + "TIME_SHARING" + ], + "enumDescriptions": [ + "Default value.", + "GPUs are time-shared between containers." + ], + "type": "string" + }, + "maxSharedClientsPerGpu": { + "description": "The max number of containers that can share a physical GPU.", + "format": "int64", + "type": "string" + } + }, + "type": "object" + }, "GcePersistentDiskCsiDriverConfig": { "description": "Configuration for the Compute Engine PD CSI driver.", "id": "GcePersistentDiskCsiDriverConfig", @@ -4556,7 +4589,7 @@ "type": "object" }, "NodeConfig": { - "description": "Parameters that describe the nodes in a cluster. *Note:* GKE Autopilot clusters do not recognize parameters in `NodeConfig`. Use AutoprovisioningNodePoolDefaults instead.", + "description": "Parameters that describe the nodes in a cluster. GKE Autopilot clusters do not recognize parameters in `NodeConfig`. Use AutoprovisioningNodePoolDefaults instead.", "id": "NodeConfig", "properties": { "accelerators": { diff --git a/container/v1beta1/container-gen.go b/container/v1beta1/container-gen.go index 5bf6d807ebd..52d246db609 100644 --- a/container/v1beta1/container-gen.go +++ b/container/v1beta1/container-gen.go @@ -295,6 +295,13 @@ type AcceleratorConfig struct { // (https://docs.nvidia.com/datacenter/tesla/mig-user-guide/#partitioning). GpuPartitionSize string `json:"gpuPartitionSize,omitempty"` + // GpuSharingConfig: The configuration for GPU sharing options. + GpuSharingConfig *GPUSharingConfig `json:"gpuSharingConfig,omitempty"` + + // MaxTimeSharedClientsPerGpu: The number of time-shared GPU resources + // to expose for each physical GPU. + MaxTimeSharedClientsPerGpu int64 `json:"maxTimeSharedClientsPerGpu,omitempty,string"` + // ForceSendFields is a list of field names (e.g. "AcceleratorCount") to // unconditionally include in API requests. By default, fields with // empty or default values are omitted from API requests. However, any @@ -2143,6 +2150,45 @@ func (s *Filter) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// GPUSharingConfig: GPUSharingConfig represents the GPU sharing +// configuration for Hardware Accelerators. +type GPUSharingConfig struct { + // GpuSharingStrategy: The type of GPU sharing strategy to enable on the + // GPU node. + // + // Possible values: + // "GPU_SHARING_STRATEGY_UNSPECIFIED" - Default value. + // "TIME_SHARING" - GPUs are time-shared between containers. + GpuSharingStrategy string `json:"gpuSharingStrategy,omitempty"` + + // MaxSharedClientsPerGpu: The max number of containers that can share a + // physical GPU. + MaxSharedClientsPerGpu int64 `json:"maxSharedClientsPerGpu,omitempty,string"` + + // ForceSendFields is a list of field names (e.g. "GpuSharingStrategy") + // 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. "GpuSharingStrategy") 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 *GPUSharingConfig) MarshalJSON() ([]byte, error) { + type NoMethod GPUSharingConfig + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // GcePersistentDiskCsiDriverConfig: Configuration for the Compute // Engine PD CSI driver. type GcePersistentDiskCsiDriverConfig struct { @@ -3877,9 +3923,9 @@ func (s *NetworkTags) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// NodeConfig: Parameters that describe the nodes in a cluster. *Note:* -// GKE Autopilot clusters do not recognize parameters in `NodeConfig`. -// Use AutoprovisioningNodePoolDefaults instead. +// NodeConfig: Parameters that describe the nodes in a cluster. GKE +// Autopilot clusters do not recognize parameters in `NodeConfig`. Use +// AutoprovisioningNodePoolDefaults instead. type NodeConfig struct { // Accelerators: A list of hardware accelerators to be attached to each // node. See https://cloud.google.com/compute/docs/gpus for more diff --git a/datafusion/v1/datafusion-api.json b/datafusion/v1/datafusion-api.json index 3b85fde48bf..9a97c1b6054 100644 --- a/datafusion/v1/datafusion-api.json +++ b/datafusion/v1/datafusion-api.json @@ -737,7 +737,7 @@ } } }, - "revision": "20220504", + "revision": "20220603", "rootUrl": "https://datafusion.googleapis.com/", "schemas": { "Accelerator": { @@ -903,16 +903,12 @@ "description": "Confirguration of PubSubEventWriter.", "id": "EventPublishConfig", "properties": { - "eventPublishEnabled": { + "enabled": { "description": "Required. Option to enable Event Publishing.", "type": "boolean" }, - "project": { - "description": "Project name.", - "type": "string" - }, "topic": { - "description": "Required. Pub/Sub Topic.", + "description": "Required. The resource name of the Pub/Sub topic. Format: projects/{project_id}/topics/{topic_id}", "type": "string" } }, diff --git a/datafusion/v1/datafusion-gen.go b/datafusion/v1/datafusion-gen.go index e456c9ca594..76d90d9b0ee 100644 --- a/datafusion/v1/datafusion-gen.go +++ b/datafusion/v1/datafusion-gen.go @@ -525,30 +525,27 @@ type Empty struct { // EventPublishConfig: Confirguration of PubSubEventWriter. type EventPublishConfig struct { - // EventPublishEnabled: Required. Option to enable Event Publishing. - EventPublishEnabled bool `json:"eventPublishEnabled,omitempty"` + // Enabled: Required. Option to enable Event Publishing. + Enabled bool `json:"enabled,omitempty"` - // Project: Project name. - Project string `json:"project,omitempty"` - - // Topic: Required. Pub/Sub Topic. + // Topic: Required. The resource name of the Pub/Sub topic. Format: + // projects/{project_id}/topics/{topic_id} Topic string `json:"topic,omitempty"` - // ForceSendFields is a list of field names (e.g. "EventPublishEnabled") - // to unconditionally include in API requests. By default, fields with + // ForceSendFields is a list of field names (e.g. "Enabled") 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. "EventPublishEnabled") 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. "Enabled") 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:"-"` } diff --git a/dataplex/v1/dataplex-api.json b/dataplex/v1/dataplex-api.json index 1480f4ff605..06f37994785 100644 --- a/dataplex/v1/dataplex-api.json +++ b/dataplex/v1/dataplex-api.json @@ -483,8 +483,106 @@ }, "content": { "methods": { + "create": { + "description": "Create a content.", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/lakes/{lakesId}/content", + "httpMethod": "POST", + "id": "dataplex.projects.locations.lakes.content.create", + "parameterOrder": [ + "parent" + ], + "parameters": { + "parent": { + "description": "Required. The resource name of the parent lake: projects/{project_id}/locations/{location_id}/lakes/{lake_id}", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/lakes/[^/]+$", + "required": true, + "type": "string" + }, + "validateOnly": { + "description": "Optional. Only validate the request, but do not perform mutations. The default is false.", + "location": "query", + "type": "boolean" + } + }, + "path": "v1/{+parent}/content", + "request": { + "$ref": "GoogleCloudDataplexV1Content" + }, + "response": { + "$ref": "GoogleCloudDataplexV1Content" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "delete": { + "description": "Delete a content.", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/lakes/{lakesId}/content/{contentId}", + "httpMethod": "DELETE", + "id": "dataplex.projects.locations.lakes.content.delete", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Required. The resource name of the content: projects/{project_id}/locations/{location_id}/lakes/{lake_id}/content/{content_id}", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/lakes/[^/]+/content/.*$", + "required": true, + "type": "string" + } + }, + "path": "v1/{+name}", + "response": { + "$ref": "Empty" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "get": { + "description": "Get a content resource.", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/lakes/{lakesId}/content/{contentId}", + "httpMethod": "GET", + "id": "dataplex.projects.locations.lakes.content.get", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Required. The resource name of the content: projects/{project_id}/locations/{location_id}/lakes/{lake_id}/content/{content_id}", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/lakes/[^/]+/content/.*$", + "required": true, + "type": "string" + }, + "view": { + "description": "Optional. Specify content view to make a partial request.", + "enum": [ + "CONTENT_VIEW_UNSPECIFIED", + "BASIC", + "FULL" + ], + "enumDescriptions": [ + "Content view not specified. Defaults to BASIC. The API will default to the BASIC view.", + "Will not return the data_text field.", + "Returns the complete proto." + ], + "location": "query", + "type": "string" + } + }, + "path": "v1/{+name}", + "response": { + "$ref": "GoogleCloudDataplexV1Content" + }, + "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.", + "description": "Gets the access control policy for a contentitem resource. A NOT_FOUND error is returned if the resource does not exist. An empty policy is returned if the resource exists but does not have a policy set on it.Caller must have Google IAM dataplex.content.getIamPolicy permission on the resource.", "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/lakes/{lakesId}/content/{contentId}:getIamPolicy", "httpMethod": "GET", "id": "dataplex.projects.locations.lakes.content.getIamPolicy", @@ -501,7 +599,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": "^projects/[^/]+/locations/[^/]+/lakes/[^/]+/content/[^/]+$", + "pattern": "^projects/[^/]+/locations/[^/]+/lakes/[^/]+/content/.*$", "required": true, "type": "string" } @@ -514,8 +612,88 @@ "https://www.googleapis.com/auth/cloud-platform" ] }, + "list": { + "description": "List content.", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/lakes/{lakesId}/content", + "httpMethod": "GET", + "id": "dataplex.projects.locations.lakes.content.list", + "parameterOrder": [ + "parent" + ], + "parameters": { + "filter": { + "description": "Optional. Filter request. Filters are case-sensitive. The following formats are supported:labels.key1 = \"value1\" labels:key1 type = \"NOTEBOOK\" type = \"SQL_SCRIPT\"These restrictions can be coinjoined with AND, OR and NOT conjunctions.", + "location": "query", + "type": "string" + }, + "pageSize": { + "description": "Optional. Maximum number of content to return. The service may return fewer than this value. If unspecified, at most 10 content will be returned. The maximum value is 1000; values above 1000 will be coerced to 1000.", + "format": "int32", + "location": "query", + "type": "integer" + }, + "pageToken": { + "description": "Optional. Page token received from a previous ListContent call. Provide this to retrieve the subsequent page. When paginating, all other parameters provided to ListContent must match the call that provided the page token.", + "location": "query", + "type": "string" + }, + "parent": { + "description": "Required. The resource name of the parent lake: projects/{project_id}/locations/{location_id}/lakes/{lake_id}", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/lakes/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1/{+parent}/content", + "response": { + "$ref": "GoogleCloudDataplexV1ListContentResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "patch": { + "description": "Update a content. Only supports full resource update.", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/lakes/{lakesId}/content/{contentId}", + "httpMethod": "PATCH", + "id": "dataplex.projects.locations.lakes.content.patch", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Output only. The relative resource name of the content, of the form: projects/{project_id}/locations/{location_id}/lakes/{lake_id}/content/{content_id}", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/lakes/[^/]+/content/.*$", + "required": true, + "type": "string" + }, + "updateMask": { + "description": "Required. Mask of fields to update.", + "format": "google-fieldmask", + "location": "query", + "type": "string" + }, + "validateOnly": { + "description": "Optional. Only validate the request, but do not perform mutations. The default is false.", + "location": "query", + "type": "boolean" + } + }, + "path": "v1/{+name}", + "request": { + "$ref": "GoogleCloudDataplexV1Content" + }, + "response": { + "$ref": "GoogleCloudDataplexV1Content" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, "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.", + "description": "Sets the access control policy on the specified contentitem resource. Replaces any existing policy.Caller must have Google IAM dataplex.content.setIamPolicy permission on the resource.", "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/lakes/{lakesId}/content/{contentId}:setIamPolicy", "httpMethod": "POST", "id": "dataplex.projects.locations.lakes.content.setIamPolicy", @@ -526,7 +704,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": "^projects/[^/]+/locations/[^/]+/lakes/[^/]+/content/[^/]+$", + "pattern": "^projects/[^/]+/locations/[^/]+/lakes/[^/]+/content/.*$", "required": true, "type": "string" } @@ -543,7 +721,7 @@ ] }, "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.", + "description": "Returns the caller's permissions on a resource. If the resource does not exist, an empty set of permissions is returned (a NOT_FOUND error is not returned).A caller is not required to have Google IAM permission to make this request.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}/lakes/{lakesId}/content/{contentId}:testIamPermissions", "httpMethod": "POST", "id": "dataplex.projects.locations.lakes.content.testIamPermissions", @@ -554,7 +732,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": "^projects/[^/]+/locations/[^/]+/lakes/[^/]+/content/[^/]+$", + "pattern": "^projects/[^/]+/locations/[^/]+/lakes/[^/]+/content/.*$", "required": true, "type": "string" } @@ -672,6 +850,37 @@ "https://www.googleapis.com/auth/cloud-platform" ] }, + "getIamPolicy": { + "description": "Gets the access control policy for a contentitem resource. A NOT_FOUND error is returned if the resource does not exist. An empty policy is returned if the resource exists but does not have a policy set on it.Caller must have Google IAM dataplex.content.getIamPolicy permission on the resource.", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/lakes/{lakesId}/contentitems/{contentitemsId}:getIamPolicy", + "httpMethod": "GET", + "id": "dataplex.projects.locations.lakes.contentitems.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/[^/]+/lakes/[^/]+/contentitems/.*$", + "required": true, + "type": "string" + } + }, + "path": "v1/{+resource}:getIamPolicy", + "response": { + "$ref": "GoogleIamV1Policy" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, "list": { "description": "List content.", "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/lakes/{lakesId}/contentitems", @@ -751,6 +960,62 @@ "scopes": [ "https://www.googleapis.com/auth/cloud-platform" ] + }, + "setIamPolicy": { + "description": "Sets the access control policy on the specified contentitem resource. Replaces any existing policy.Caller must have Google IAM dataplex.content.setIamPolicy permission on the resource.", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/lakes/{lakesId}/contentitems/{contentitemsId}:setIamPolicy", + "httpMethod": "POST", + "id": "dataplex.projects.locations.lakes.contentitems.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/[^/]+/lakes/[^/]+/contentitems/.*$", + "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 the caller's permissions on a resource. If the resource does not exist, an empty set of permissions is returned (a NOT_FOUND error is not returned).A caller is not required to have Google IAM permission to make this request.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}/lakes/{lakesId}/contentitems/{contentitemsId}:testIamPermissions", + "httpMethod": "POST", + "id": "dataplex.projects.locations.lakes.contentitems.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/[^/]+/lakes/[^/]+/contentitems/.*$", + "required": true, + "type": "string" + } + }, + "path": "v1/{+resource}:testIamPermissions", + "request": { + "$ref": "GoogleIamV1TestIamPermissionsRequest" + }, + "response": { + "$ref": "GoogleIamV1TestIamPermissionsResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] } } }, @@ -2499,7 +2764,7 @@ } } }, - "revision": "20220509", + "revision": "20220531", "rootUrl": "https://dataplex.googleapis.com/", "schemas": { "Empty": { diff --git a/dataplex/v1/dataplex-gen.go b/dataplex/v1/dataplex-gen.go index 5aaec4906fd..babf2b05da4 100644 --- a/dataplex/v1/dataplex-gen.go +++ b/dataplex/v1/dataplex-gen.go @@ -6515,118 +6515,97 @@ func (c *ProjectsLocationsLakesActionsListCall) Pages(ctx context.Context, f fun } } -// method id "dataplex.projects.locations.lakes.content.getIamPolicy": +// method id "dataplex.projects.locations.lakes.content.create": -type ProjectsLocationsLakesContentGetIamPolicyCall struct { - s *Service - resource string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header +type ProjectsLocationsLakesContentCreateCall struct { + s *Service + parent string + googleclouddataplexv1content *GoogleCloudDataplexV1Content + urlParams_ gensupport.URLParams + 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. +// Create: Create a content. // -// - 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 *ProjectsLocationsLakesContentService) GetIamPolicy(resource string) *ProjectsLocationsLakesContentGetIamPolicyCall { - c := &ProjectsLocationsLakesContentGetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.resource = resource +// - parent: The resource name of the parent lake: +// projects/{project_id}/locations/{location_id}/lakes/{lake_id}. +func (r *ProjectsLocationsLakesContentService) Create(parent string, googleclouddataplexv1content *GoogleCloudDataplexV1Content) *ProjectsLocationsLakesContentCreateCall { + c := &ProjectsLocationsLakesContentCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + c.googleclouddataplexv1content = googleclouddataplexv1content 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 *ProjectsLocationsLakesContentGetIamPolicyCall) OptionsRequestedPolicyVersion(optionsRequestedPolicyVersion int64) *ProjectsLocationsLakesContentGetIamPolicyCall { - c.urlParams_.Set("options.requestedPolicyVersion", fmt.Sprint(optionsRequestedPolicyVersion)) +// ValidateOnly sets the optional parameter "validateOnly": Only +// validate the request, but do not perform mutations. The default is +// false. +func (c *ProjectsLocationsLakesContentCreateCall) ValidateOnly(validateOnly bool) *ProjectsLocationsLakesContentCreateCall { + c.urlParams_.Set("validateOnly", fmt.Sprint(validateOnly)) 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 *ProjectsLocationsLakesContentGetIamPolicyCall) Fields(s ...googleapi.Field) *ProjectsLocationsLakesContentGetIamPolicyCall { +func (c *ProjectsLocationsLakesContentCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsLakesContentCreateCall { 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 *ProjectsLocationsLakesContentGetIamPolicyCall) IfNoneMatch(entityTag string) *ProjectsLocationsLakesContentGetIamPolicyCall { - 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 *ProjectsLocationsLakesContentGetIamPolicyCall) Context(ctx context.Context) *ProjectsLocationsLakesContentGetIamPolicyCall { +func (c *ProjectsLocationsLakesContentCreateCall) Context(ctx context.Context) *ProjectsLocationsLakesContentCreateCall { 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 *ProjectsLocationsLakesContentGetIamPolicyCall) Header() http.Header { +func (c *ProjectsLocationsLakesContentCreateCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsLakesContentGetIamPolicyCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsLakesContentCreateCall) 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.googleclouddataplexv1content) + 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}:getIamPolicy") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/content") 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{ - "resource": c.resource, + "parent": c.parent, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "dataplex.projects.locations.lakes.content.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 +// Do executes the "dataplex.projects.locations.lakes.content.create" call. +// Exactly one of *GoogleCloudDataplexV1Content or error will be +// non-nil. Any non-2xx status code is an error. Response headers are in +// either *GoogleCloudDataplexV1Content.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 *ProjectsLocationsLakesContentGetIamPolicyCall) Do(opts ...googleapi.CallOption) (*GoogleIamV1Policy, error) { +func (c *ProjectsLocationsLakesContentCreateCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDataplexV1Content, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -6645,7 +6624,7 @@ func (c *ProjectsLocationsLakesContentGetIamPolicyCall) Do(opts ...googleapi.Cal if err := googleapi.CheckResponse(res); err != nil { return nil, err } - ret := &GoogleIamV1Policy{ + ret := &GoogleCloudDataplexV1Content{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -6657,31 +6636,33 @@ func (c *ProjectsLocationsLakesContentGetIamPolicyCall) Do(opts ...googleapi.Cal } 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}/lakes/{lakesId}/content/{contentId}:getIamPolicy", - // "httpMethod": "GET", - // "id": "dataplex.projects.locations.lakes.content.getIamPolicy", + // "description": "Create a content.", + // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/lakes/{lakesId}/content", + // "httpMethod": "POST", + // "id": "dataplex.projects.locations.lakes.content.create", // "parameterOrder": [ - // "resource" + // "parent" // ], // "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.", + // "parent": { + // "description": "Required. The resource name of the parent lake: projects/{project_id}/locations/{location_id}/lakes/{lake_id}", // "location": "path", - // "pattern": "^projects/[^/]+/locations/[^/]+/lakes/[^/]+/content/[^/]+$", + // "pattern": "^projects/[^/]+/locations/[^/]+/lakes/[^/]+$", // "required": true, // "type": "string" + // }, + // "validateOnly": { + // "description": "Optional. Only validate the request, but do not perform mutations. The default is false.", + // "location": "query", + // "type": "boolean" // } // }, - // "path": "v1/{+resource}:getIamPolicy", + // "path": "v1/{+parent}/content", + // "request": { + // "$ref": "GoogleCloudDataplexV1Content" + // }, // "response": { - // "$ref": "GoogleIamV1Policy" + // "$ref": "GoogleCloudDataplexV1Content" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -6690,36 +6671,31 @@ func (c *ProjectsLocationsLakesContentGetIamPolicyCall) Do(opts ...googleapi.Cal } -// method id "dataplex.projects.locations.lakes.content.setIamPolicy": +// method id "dataplex.projects.locations.lakes.content.delete": -type ProjectsLocationsLakesContentSetIamPolicyCall struct { - s *Service - resource string - googleiamv1setiampolicyrequest *GoogleIamV1SetIamPolicyRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ProjectsLocationsLakesContentDeleteCall struct { + s *Service + name string + 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. +// Delete: Delete a content. // -// - 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 *ProjectsLocationsLakesContentService) SetIamPolicy(resource string, googleiamv1setiampolicyrequest *GoogleIamV1SetIamPolicyRequest) *ProjectsLocationsLakesContentSetIamPolicyCall { - c := &ProjectsLocationsLakesContentSetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.resource = resource - c.googleiamv1setiampolicyrequest = googleiamv1setiampolicyrequest +// - name: The resource name of the content: +// projects/{project_id}/locations/{location_id}/lakes/{lake_id}/conten +// t/{content_id}. +func (r *ProjectsLocationsLakesContentService) Delete(name string) *ProjectsLocationsLakesContentDeleteCall { + c := &ProjectsLocationsLakesContentDeleteCall{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 *ProjectsLocationsLakesContentSetIamPolicyCall) Fields(s ...googleapi.Field) *ProjectsLocationsLakesContentSetIamPolicyCall { +func (c *ProjectsLocationsLakesContentDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsLakesContentDeleteCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -6727,21 +6703,21 @@ func (c *ProjectsLocationsLakesContentSetIamPolicyCall) Fields(s ...googleapi.Fi // 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 *ProjectsLocationsLakesContentSetIamPolicyCall) Context(ctx context.Context) *ProjectsLocationsLakesContentSetIamPolicyCall { +func (c *ProjectsLocationsLakesContentDeleteCall) Context(ctx context.Context) *ProjectsLocationsLakesContentDeleteCall { 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 *ProjectsLocationsLakesContentSetIamPolicyCall) Header() http.Header { +func (c *ProjectsLocationsLakesContentDeleteCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsLakesContentSetIamPolicyCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsLakesContentDeleteCall) 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_ { @@ -6749,34 +6725,29 @@ func (c *ProjectsLocationsLakesContentSetIamPolicyCall) doRequest(alt string) (* } 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 := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) + req, err := http.NewRequest("DELETE", urls, body) if err != nil { return nil, err } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "resource": c.resource, + "name": c.name, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "dataplex.projects.locations.lakes.content.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 *ProjectsLocationsLakesContentSetIamPolicyCall) Do(opts ...googleapi.CallOption) (*GoogleIamV1Policy, error) { +// Do executes the "dataplex.projects.locations.lakes.content.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 *ProjectsLocationsLakesContentDeleteCall) Do(opts ...googleapi.CallOption) (*Empty, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -6795,7 +6766,7 @@ func (c *ProjectsLocationsLakesContentSetIamPolicyCall) Do(opts ...googleapi.Cal if err := googleapi.CheckResponse(res); err != nil { return nil, err } - ret := &GoogleIamV1Policy{ + ret := &Empty{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -6807,28 +6778,25 @@ func (c *ProjectsLocationsLakesContentSetIamPolicyCall) Do(opts ...googleapi.Cal } 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}/lakes/{lakesId}/content/{contentId}:setIamPolicy", - // "httpMethod": "POST", - // "id": "dataplex.projects.locations.lakes.content.setIamPolicy", + // "description": "Delete a content.", + // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/lakes/{lakesId}/content/{contentId}", + // "httpMethod": "DELETE", + // "id": "dataplex.projects.locations.lakes.content.delete", // "parameterOrder": [ - // "resource" + // "name" // ], // "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.", + // "name": { + // "description": "Required. The resource name of the content: projects/{project_id}/locations/{location_id}/lakes/{lake_id}/content/{content_id}", // "location": "path", - // "pattern": "^projects/[^/]+/locations/[^/]+/lakes/[^/]+/content/[^/]+$", + // "pattern": "^projects/[^/]+/locations/[^/]+/lakes/[^/]+/content/.*$", // "required": true, // "type": "string" // } // }, - // "path": "v1/{+resource}:setIamPolicy", - // "request": { - // "$ref": "GoogleIamV1SetIamPolicyRequest" - // }, + // "path": "v1/{+name}", // "response": { - // "$ref": "GoogleIamV1Policy" + // "$ref": "Empty" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -6837,97 +6805,110 @@ func (c *ProjectsLocationsLakesContentSetIamPolicyCall) Do(opts ...googleapi.Cal } -// method id "dataplex.projects.locations.lakes.content.testIamPermissions": +// method id "dataplex.projects.locations.lakes.content.get": -type ProjectsLocationsLakesContentTestIamPermissionsCall struct { - s *Service - resource string - googleiamv1testiampermissionsrequest *GoogleIamV1TestIamPermissionsRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ProjectsLocationsLakesContentGetCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + 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. +// Get: Get a content resource. // -// - 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 *ProjectsLocationsLakesContentService) TestIamPermissions(resource string, googleiamv1testiampermissionsrequest *GoogleIamV1TestIamPermissionsRequest) *ProjectsLocationsLakesContentTestIamPermissionsCall { - c := &ProjectsLocationsLakesContentTestIamPermissionsCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.resource = resource - c.googleiamv1testiampermissionsrequest = googleiamv1testiampermissionsrequest +// - name: The resource name of the content: +// projects/{project_id}/locations/{location_id}/lakes/{lake_id}/conten +// t/{content_id}. +func (r *ProjectsLocationsLakesContentService) Get(name string) *ProjectsLocationsLakesContentGetCall { + c := &ProjectsLocationsLakesContentGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + return c +} + +// View sets the optional parameter "view": Specify content view to make +// a partial request. +// +// Possible values: +// "CONTENT_VIEW_UNSPECIFIED" - Content view not specified. Defaults +// to BASIC. The API will default to the BASIC view. +// "BASIC" - Will not return the data_text field. +// "FULL" - Returns the complete proto. +func (c *ProjectsLocationsLakesContentGetCall) View(view string) *ProjectsLocationsLakesContentGetCall { + c.urlParams_.Set("view", view) 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 *ProjectsLocationsLakesContentTestIamPermissionsCall) Fields(s ...googleapi.Field) *ProjectsLocationsLakesContentTestIamPermissionsCall { +func (c *ProjectsLocationsLakesContentGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsLakesContentGetCall { 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 *ProjectsLocationsLakesContentGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsLakesContentGetCall { + 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 *ProjectsLocationsLakesContentTestIamPermissionsCall) Context(ctx context.Context) *ProjectsLocationsLakesContentTestIamPermissionsCall { +func (c *ProjectsLocationsLakesContentGetCall) Context(ctx context.Context) *ProjectsLocationsLakesContentGetCall { 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 *ProjectsLocationsLakesContentTestIamPermissionsCall) Header() http.Header { +func (c *ProjectsLocationsLakesContentGetCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsLakesContentTestIamPermissionsCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsLakesContentGetCall) 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 + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) } - reqHeaders.Set("Content-Type", "application/json") + var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+resource}:testIamPermissions") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) + 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, + "name": c.name, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "dataplex.projects.locations.lakes.content.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 +// Do executes the "dataplex.projects.locations.lakes.content.get" call. +// Exactly one of *GoogleCloudDataplexV1Content or error will be +// non-nil. Any non-2xx status code is an error. Response headers are in +// either *GoogleCloudDataplexV1Content.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 *ProjectsLocationsLakesContentTestIamPermissionsCall) Do(opts ...googleapi.CallOption) (*GoogleIamV1TestIamPermissionsResponse, error) { +func (c *ProjectsLocationsLakesContentGetCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDataplexV1Content, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -6946,7 +6927,7 @@ func (c *ProjectsLocationsLakesContentTestIamPermissionsCall) Do(opts ...googlea if err := googleapi.CheckResponse(res); err != nil { return nil, err } - ret := &GoogleIamV1TestIamPermissionsResponse{ + ret := &GoogleCloudDataplexV1Content{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -6958,28 +6939,40 @@ func (c *ProjectsLocationsLakesContentTestIamPermissionsCall) Do(opts ...googlea } 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}/lakes/{lakesId}/content/{contentId}:testIamPermissions", - // "httpMethod": "POST", - // "id": "dataplex.projects.locations.lakes.content.testIamPermissions", + // "description": "Get a content resource.", + // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/lakes/{lakesId}/content/{contentId}", + // "httpMethod": "GET", + // "id": "dataplex.projects.locations.lakes.content.get", // "parameterOrder": [ - // "resource" + // "name" // ], // "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.", + // "name": { + // "description": "Required. The resource name of the content: projects/{project_id}/locations/{location_id}/lakes/{lake_id}/content/{content_id}", // "location": "path", - // "pattern": "^projects/[^/]+/locations/[^/]+/lakes/[^/]+/content/[^/]+$", + // "pattern": "^projects/[^/]+/locations/[^/]+/lakes/[^/]+/content/.*$", // "required": true, // "type": "string" + // }, + // "view": { + // "description": "Optional. Specify content view to make a partial request.", + // "enum": [ + // "CONTENT_VIEW_UNSPECIFIED", + // "BASIC", + // "FULL" + // ], + // "enumDescriptions": [ + // "Content view not specified. Defaults to BASIC. The API will default to the BASIC view.", + // "Will not return the data_text field.", + // "Returns the complete proto." + // ], + // "location": "query", + // "type": "string" // } // }, - // "path": "v1/{+resource}:testIamPermissions", - // "request": { - // "$ref": "GoogleIamV1TestIamPermissionsRequest" - // }, + // "path": "v1/{+name}", // "response": { - // "$ref": "GoogleIamV1TestIamPermissionsResponse" + // "$ref": "GoogleCloudDataplexV1Content" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -6988,97 +6981,120 @@ func (c *ProjectsLocationsLakesContentTestIamPermissionsCall) Do(opts ...googlea } -// method id "dataplex.projects.locations.lakes.contentitems.create": +// method id "dataplex.projects.locations.lakes.content.getIamPolicy": -type ProjectsLocationsLakesContentitemsCreateCall struct { - s *Service - parent string - googleclouddataplexv1content *GoogleCloudDataplexV1Content - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ProjectsLocationsLakesContentGetIamPolicyCall struct { + s *Service + resource string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header } -// Create: Create a content. +// GetIamPolicy: Gets the access control policy for a contentitem +// resource. A NOT_FOUND error is returned if the resource does not +// exist. An empty policy is returned if the resource exists but does +// not have a policy set on it.Caller must have Google IAM +// dataplex.content.getIamPolicy permission on the resource. // -// - parent: The resource name of the parent lake: -// projects/{project_id}/locations/{location_id}/lakes/{lake_id}. -func (r *ProjectsLocationsLakesContentitemsService) Create(parent string, googleclouddataplexv1content *GoogleCloudDataplexV1Content) *ProjectsLocationsLakesContentitemsCreateCall { - c := &ProjectsLocationsLakesContentitemsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.parent = parent - c.googleclouddataplexv1content = googleclouddataplexv1content +// - 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 *ProjectsLocationsLakesContentService) GetIamPolicy(resource string) *ProjectsLocationsLakesContentGetIamPolicyCall { + c := &ProjectsLocationsLakesContentGetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.resource = resource return c } -// ValidateOnly sets the optional parameter "validateOnly": Only -// validate the request, but do not perform mutations. The default is -// false. -func (c *ProjectsLocationsLakesContentitemsCreateCall) ValidateOnly(validateOnly bool) *ProjectsLocationsLakesContentitemsCreateCall { - c.urlParams_.Set("validateOnly", fmt.Sprint(validateOnly)) +// 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 *ProjectsLocationsLakesContentGetIamPolicyCall) OptionsRequestedPolicyVersion(optionsRequestedPolicyVersion int64) *ProjectsLocationsLakesContentGetIamPolicyCall { + 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 *ProjectsLocationsLakesContentitemsCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsLakesContentitemsCreateCall { +func (c *ProjectsLocationsLakesContentGetIamPolicyCall) Fields(s ...googleapi.Field) *ProjectsLocationsLakesContentGetIamPolicyCall { 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 *ProjectsLocationsLakesContentGetIamPolicyCall) IfNoneMatch(entityTag string) *ProjectsLocationsLakesContentGetIamPolicyCall { + 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 *ProjectsLocationsLakesContentitemsCreateCall) Context(ctx context.Context) *ProjectsLocationsLakesContentitemsCreateCall { +func (c *ProjectsLocationsLakesContentGetIamPolicyCall) Context(ctx context.Context) *ProjectsLocationsLakesContentGetIamPolicyCall { 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 *ProjectsLocationsLakesContentitemsCreateCall) Header() http.Header { +func (c *ProjectsLocationsLakesContentGetIamPolicyCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsLakesContentitemsCreateCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsLakesContentGetIamPolicyCall) 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.googleclouddataplexv1content) - if err != nil { - return nil, err + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) } - reqHeaders.Set("Content-Type", "application/json") + var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/contentitems") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+resource}:getIamPolicy") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) + 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, + "resource": c.resource, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "dataplex.projects.locations.lakes.contentitems.create" call. -// Exactly one of *GoogleCloudDataplexV1Content or error will be -// non-nil. Any non-2xx status code is an error. Response headers are in -// either *GoogleCloudDataplexV1Content.ServerResponse.Header or (if a -// response was returned at all) in error.(*googleapi.Error).Header. Use +// Do executes the "dataplex.projects.locations.lakes.content.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 *ProjectsLocationsLakesContentitemsCreateCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDataplexV1Content, error) { +func (c *ProjectsLocationsLakesContentGetIamPolicyCall) Do(opts ...googleapi.CallOption) (*GoogleIamV1Policy, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -7097,7 +7113,7 @@ func (c *ProjectsLocationsLakesContentitemsCreateCall) Do(opts ...googleapi.Call if err := googleapi.CheckResponse(res); err != nil { return nil, err } - ret := &GoogleCloudDataplexV1Content{ + ret := &GoogleIamV1Policy{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -7109,33 +7125,31 @@ func (c *ProjectsLocationsLakesContentitemsCreateCall) Do(opts ...googleapi.Call } return ret, nil // { - // "description": "Create a content.", - // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/lakes/{lakesId}/contentitems", - // "httpMethod": "POST", - // "id": "dataplex.projects.locations.lakes.contentitems.create", + // "description": "Gets the access control policy for a contentitem resource. A NOT_FOUND error is returned if the resource does not exist. An empty policy is returned if the resource exists but does not have a policy set on it.Caller must have Google IAM dataplex.content.getIamPolicy permission on the resource.", + // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/lakes/{lakesId}/content/{contentId}:getIamPolicy", + // "httpMethod": "GET", + // "id": "dataplex.projects.locations.lakes.content.getIamPolicy", // "parameterOrder": [ - // "parent" + // "resource" // ], // "parameters": { - // "parent": { - // "description": "Required. The resource name of the parent lake: projects/{project_id}/locations/{location_id}/lakes/{lake_id}", + // "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/[^/]+/lakes/[^/]+$", + // "pattern": "^projects/[^/]+/locations/[^/]+/lakes/[^/]+/content/.*$", // "required": true, // "type": "string" - // }, - // "validateOnly": { - // "description": "Optional. Only validate the request, but do not perform mutations. The default is false.", - // "location": "query", - // "type": "boolean" // } // }, - // "path": "v1/{+parent}/contentitems", - // "request": { - // "$ref": "GoogleCloudDataplexV1Content" - // }, + // "path": "v1/{+resource}:getIamPolicy", // "response": { - // "$ref": "GoogleCloudDataplexV1Content" + // "$ref": "GoogleIamV1Policy" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -7144,77 +7158,916 @@ func (c *ProjectsLocationsLakesContentitemsCreateCall) Do(opts ...googleapi.Call } -// method id "dataplex.projects.locations.lakes.contentitems.delete": +// method id "dataplex.projects.locations.lakes.content.list": -type ProjectsLocationsLakesContentitemsDeleteCall struct { - s *Service - name string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ProjectsLocationsLakesContentListCall struct { + s *Service + parent string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header } -// Delete: Delete a content. +// List: List content. // -// - name: The resource name of the content: -// projects/{project_id}/locations/{location_id}/lakes/{lake_id}/conten -// t/{content_id}. -func (r *ProjectsLocationsLakesContentitemsService) Delete(name string) *ProjectsLocationsLakesContentitemsDeleteCall { - c := &ProjectsLocationsLakesContentitemsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.name = name +// - parent: The resource name of the parent lake: +// projects/{project_id}/locations/{location_id}/lakes/{lake_id}. +func (r *ProjectsLocationsLakesContentService) List(parent string) *ProjectsLocationsLakesContentListCall { + c := &ProjectsLocationsLakesContentListCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + return c +} + +// Filter sets the optional parameter "filter": Filter request. Filters +// are case-sensitive. The following formats are supported:labels.key1 = +// "value1" labels:key1 type = "NOTEBOOK" type = "SQL_SCRIPT"These +// restrictions can be coinjoined with AND, OR and NOT conjunctions. +func (c *ProjectsLocationsLakesContentListCall) Filter(filter string) *ProjectsLocationsLakesContentListCall { + c.urlParams_.Set("filter", filter) + return c +} + +// PageSize sets the optional parameter "pageSize": Maximum number of +// content to return. The service may return fewer than this value. If +// unspecified, at most 10 content will be returned. The maximum value +// is 1000; values above 1000 will be coerced to 1000. +func (c *ProjectsLocationsLakesContentListCall) PageSize(pageSize int64) *ProjectsLocationsLakesContentListCall { + c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) + return c +} + +// PageToken sets the optional parameter "pageToken": Page token +// received from a previous ListContent call. Provide this to retrieve +// the subsequent page. When paginating, all other parameters provided +// to ListContent must match the call that provided the page token. +func (c *ProjectsLocationsLakesContentListCall) PageToken(pageToken string) *ProjectsLocationsLakesContentListCall { + 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 *ProjectsLocationsLakesContentitemsDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsLakesContentitemsDeleteCall { +func (c *ProjectsLocationsLakesContentListCall) Fields(s ...googleapi.Field) *ProjectsLocationsLakesContentListCall { 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 *ProjectsLocationsLakesContentListCall) IfNoneMatch(entityTag string) *ProjectsLocationsLakesContentListCall { + 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 *ProjectsLocationsLakesContentitemsDeleteCall) Context(ctx context.Context) *ProjectsLocationsLakesContentitemsDeleteCall { +func (c *ProjectsLocationsLakesContentListCall) Context(ctx context.Context) *ProjectsLocationsLakesContentListCall { 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 *ProjectsLocationsLakesContentitemsDeleteCall) Header() http.Header { +func (c *ProjectsLocationsLakesContentListCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsLakesContentitemsDeleteCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsLakesContentListCall) 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 := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/content") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("DELETE", urls, body) + 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, + "parent": c.parent, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "dataplex.projects.locations.lakes.contentitems.delete" call. -// Exactly one of *Empty or error will be non-nil. Any non-2xx status +// Do executes the "dataplex.projects.locations.lakes.content.list" call. +// Exactly one of *GoogleCloudDataplexV1ListContentResponse or error +// will be non-nil. Any non-2xx status code is an error. Response +// headers are in either +// *GoogleCloudDataplexV1ListContentResponse.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 *ProjectsLocationsLakesContentListCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDataplexV1ListContentResponse, 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, &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, err + } + ret := &GoogleCloudDataplexV1ListContentResponse{ + 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": "List content.", + // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/lakes/{lakesId}/content", + // "httpMethod": "GET", + // "id": "dataplex.projects.locations.lakes.content.list", + // "parameterOrder": [ + // "parent" + // ], + // "parameters": { + // "filter": { + // "description": "Optional. Filter request. Filters are case-sensitive. The following formats are supported:labels.key1 = \"value1\" labels:key1 type = \"NOTEBOOK\" type = \"SQL_SCRIPT\"These restrictions can be coinjoined with AND, OR and NOT conjunctions.", + // "location": "query", + // "type": "string" + // }, + // "pageSize": { + // "description": "Optional. Maximum number of content to return. The service may return fewer than this value. If unspecified, at most 10 content will be returned. The maximum value is 1000; values above 1000 will be coerced to 1000.", + // "format": "int32", + // "location": "query", + // "type": "integer" + // }, + // "pageToken": { + // "description": "Optional. Page token received from a previous ListContent call. Provide this to retrieve the subsequent page. When paginating, all other parameters provided to ListContent must match the call that provided the page token.", + // "location": "query", + // "type": "string" + // }, + // "parent": { + // "description": "Required. The resource name of the parent lake: projects/{project_id}/locations/{location_id}/lakes/{lake_id}", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+/lakes/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1/{+parent}/content", + // "response": { + // "$ref": "GoogleCloudDataplexV1ListContentResponse" + // }, + // "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 *ProjectsLocationsLakesContentListCall) Pages(ctx context.Context, f func(*GoogleCloudDataplexV1ListContentResponse) 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 "dataplex.projects.locations.lakes.content.patch": + +type ProjectsLocationsLakesContentPatchCall struct { + s *Service + name string + googleclouddataplexv1content *GoogleCloudDataplexV1Content + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Patch: Update a content. Only supports full resource update. +// +// - name: Output only. The relative resource name of the content, of +// the form: +// projects/{project_id}/locations/{location_id}/lakes/{lake_id}/conten +// t/{content_id}. +func (r *ProjectsLocationsLakesContentService) Patch(name string, googleclouddataplexv1content *GoogleCloudDataplexV1Content) *ProjectsLocationsLakesContentPatchCall { + c := &ProjectsLocationsLakesContentPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + c.googleclouddataplexv1content = googleclouddataplexv1content + return c +} + +// UpdateMask sets the optional parameter "updateMask": Required. Mask +// of fields to update. +func (c *ProjectsLocationsLakesContentPatchCall) UpdateMask(updateMask string) *ProjectsLocationsLakesContentPatchCall { + c.urlParams_.Set("updateMask", updateMask) + return c +} + +// ValidateOnly sets the optional parameter "validateOnly": Only +// validate the request, but do not perform mutations. The default is +// false. +func (c *ProjectsLocationsLakesContentPatchCall) ValidateOnly(validateOnly bool) *ProjectsLocationsLakesContentPatchCall { + c.urlParams_.Set("validateOnly", fmt.Sprint(validateOnly)) + 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 *ProjectsLocationsLakesContentPatchCall) Fields(s ...googleapi.Field) *ProjectsLocationsLakesContentPatchCall { + 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 *ProjectsLocationsLakesContentPatchCall) Context(ctx context.Context) *ProjectsLocationsLakesContentPatchCall { + 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 *ProjectsLocationsLakesContentPatchCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsLakesContentPatchCall) 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.googleclouddataplexv1content) + 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 "dataplex.projects.locations.lakes.content.patch" call. +// Exactly one of *GoogleCloudDataplexV1Content or error will be +// non-nil. Any non-2xx status code is an error. Response headers are in +// either *GoogleCloudDataplexV1Content.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 *ProjectsLocationsLakesContentPatchCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDataplexV1Content, 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, &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, err + } + ret := &GoogleCloudDataplexV1Content{ + 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": "Update a content. Only supports full resource update.", + // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/lakes/{lakesId}/content/{contentId}", + // "httpMethod": "PATCH", + // "id": "dataplex.projects.locations.lakes.content.patch", + // "parameterOrder": [ + // "name" + // ], + // "parameters": { + // "name": { + // "description": "Output only. The relative resource name of the content, of the form: projects/{project_id}/locations/{location_id}/lakes/{lake_id}/content/{content_id}", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+/lakes/[^/]+/content/.*$", + // "required": true, + // "type": "string" + // }, + // "updateMask": { + // "description": "Required. Mask of fields to update.", + // "format": "google-fieldmask", + // "location": "query", + // "type": "string" + // }, + // "validateOnly": { + // "description": "Optional. Only validate the request, but do not perform mutations. The default is false.", + // "location": "query", + // "type": "boolean" + // } + // }, + // "path": "v1/{+name}", + // "request": { + // "$ref": "GoogleCloudDataplexV1Content" + // }, + // "response": { + // "$ref": "GoogleCloudDataplexV1Content" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "dataplex.projects.locations.lakes.content.setIamPolicy": + +type ProjectsLocationsLakesContentSetIamPolicyCall 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 +// contentitem resource. Replaces any existing policy.Caller must have +// Google IAM dataplex.content.setIamPolicy permission on the resource. +// +// - 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 *ProjectsLocationsLakesContentService) SetIamPolicy(resource string, googleiamv1setiampolicyrequest *GoogleIamV1SetIamPolicyRequest) *ProjectsLocationsLakesContentSetIamPolicyCall { + c := &ProjectsLocationsLakesContentSetIamPolicyCall{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 *ProjectsLocationsLakesContentSetIamPolicyCall) Fields(s ...googleapi.Field) *ProjectsLocationsLakesContentSetIamPolicyCall { + 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 *ProjectsLocationsLakesContentSetIamPolicyCall) Context(ctx context.Context) *ProjectsLocationsLakesContentSetIamPolicyCall { + 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 *ProjectsLocationsLakesContentSetIamPolicyCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsLakesContentSetIamPolicyCall) 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 "dataplex.projects.locations.lakes.content.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 *ProjectsLocationsLakesContentSetIamPolicyCall) 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, &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, 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 contentitem resource. Replaces any existing policy.Caller must have Google IAM dataplex.content.setIamPolicy permission on the resource.", + // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/lakes/{lakesId}/content/{contentId}:setIamPolicy", + // "httpMethod": "POST", + // "id": "dataplex.projects.locations.lakes.content.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/[^/]+/lakes/[^/]+/content/.*$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1/{+resource}:setIamPolicy", + // "request": { + // "$ref": "GoogleIamV1SetIamPolicyRequest" + // }, + // "response": { + // "$ref": "GoogleIamV1Policy" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "dataplex.projects.locations.lakes.content.testIamPermissions": + +type ProjectsLocationsLakesContentTestIamPermissionsCall struct { + s *Service + resource string + googleiamv1testiampermissionsrequest *GoogleIamV1TestIamPermissionsRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// TestIamPermissions: Returns the caller's permissions on a resource. +// If the resource does not exist, an empty set of permissions is +// returned (a NOT_FOUND error is not returned).A caller is not required +// to have Google IAM permission to make this request.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 *ProjectsLocationsLakesContentService) TestIamPermissions(resource string, googleiamv1testiampermissionsrequest *GoogleIamV1TestIamPermissionsRequest) *ProjectsLocationsLakesContentTestIamPermissionsCall { + c := &ProjectsLocationsLakesContentTestIamPermissionsCall{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 *ProjectsLocationsLakesContentTestIamPermissionsCall) Fields(s ...googleapi.Field) *ProjectsLocationsLakesContentTestIamPermissionsCall { + 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 *ProjectsLocationsLakesContentTestIamPermissionsCall) Context(ctx context.Context) *ProjectsLocationsLakesContentTestIamPermissionsCall { + 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 *ProjectsLocationsLakesContentTestIamPermissionsCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsLakesContentTestIamPermissionsCall) 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 "dataplex.projects.locations.lakes.content.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 *ProjectsLocationsLakesContentTestIamPermissionsCall) 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() + } + return nil, &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, 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 the caller's permissions on a resource. If the resource does not exist, an empty set of permissions is returned (a NOT_FOUND error is not returned).A caller is not required to have Google IAM permission to make this request.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}/lakes/{lakesId}/content/{contentId}:testIamPermissions", + // "httpMethod": "POST", + // "id": "dataplex.projects.locations.lakes.content.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/[^/]+/lakes/[^/]+/content/.*$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1/{+resource}:testIamPermissions", + // "request": { + // "$ref": "GoogleIamV1TestIamPermissionsRequest" + // }, + // "response": { + // "$ref": "GoogleIamV1TestIamPermissionsResponse" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "dataplex.projects.locations.lakes.contentitems.create": + +type ProjectsLocationsLakesContentitemsCreateCall struct { + s *Service + parent string + googleclouddataplexv1content *GoogleCloudDataplexV1Content + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Create: Create a content. +// +// - parent: The resource name of the parent lake: +// projects/{project_id}/locations/{location_id}/lakes/{lake_id}. +func (r *ProjectsLocationsLakesContentitemsService) Create(parent string, googleclouddataplexv1content *GoogleCloudDataplexV1Content) *ProjectsLocationsLakesContentitemsCreateCall { + c := &ProjectsLocationsLakesContentitemsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + c.googleclouddataplexv1content = googleclouddataplexv1content + return c +} + +// ValidateOnly sets the optional parameter "validateOnly": Only +// validate the request, but do not perform mutations. The default is +// false. +func (c *ProjectsLocationsLakesContentitemsCreateCall) ValidateOnly(validateOnly bool) *ProjectsLocationsLakesContentitemsCreateCall { + c.urlParams_.Set("validateOnly", fmt.Sprint(validateOnly)) + 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 *ProjectsLocationsLakesContentitemsCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsLakesContentitemsCreateCall { + 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 *ProjectsLocationsLakesContentitemsCreateCall) Context(ctx context.Context) *ProjectsLocationsLakesContentitemsCreateCall { + 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 *ProjectsLocationsLakesContentitemsCreateCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsLakesContentitemsCreateCall) 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.googleclouddataplexv1content) + 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}/contentitems") + 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 "dataplex.projects.locations.lakes.contentitems.create" call. +// Exactly one of *GoogleCloudDataplexV1Content or error will be +// non-nil. Any non-2xx status code is an error. Response headers are in +// either *GoogleCloudDataplexV1Content.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 *ProjectsLocationsLakesContentitemsCreateCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDataplexV1Content, 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, &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, err + } + ret := &GoogleCloudDataplexV1Content{ + 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": "Create a content.", + // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/lakes/{lakesId}/contentitems", + // "httpMethod": "POST", + // "id": "dataplex.projects.locations.lakes.contentitems.create", + // "parameterOrder": [ + // "parent" + // ], + // "parameters": { + // "parent": { + // "description": "Required. The resource name of the parent lake: projects/{project_id}/locations/{location_id}/lakes/{lake_id}", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+/lakes/[^/]+$", + // "required": true, + // "type": "string" + // }, + // "validateOnly": { + // "description": "Optional. Only validate the request, but do not perform mutations. The default is false.", + // "location": "query", + // "type": "boolean" + // } + // }, + // "path": "v1/{+parent}/contentitems", + // "request": { + // "$ref": "GoogleCloudDataplexV1Content" + // }, + // "response": { + // "$ref": "GoogleCloudDataplexV1Content" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "dataplex.projects.locations.lakes.contentitems.delete": + +type ProjectsLocationsLakesContentitemsDeleteCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Delete: Delete a content. +// +// - name: The resource name of the content: +// projects/{project_id}/locations/{location_id}/lakes/{lake_id}/conten +// t/{content_id}. +func (r *ProjectsLocationsLakesContentitemsService) Delete(name string) *ProjectsLocationsLakesContentitemsDeleteCall { + c := &ProjectsLocationsLakesContentitemsDeleteCall{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 *ProjectsLocationsLakesContentitemsDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsLakesContentitemsDeleteCall { + 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 *ProjectsLocationsLakesContentitemsDeleteCall) Context(ctx context.Context) *ProjectsLocationsLakesContentitemsDeleteCall { + 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 *ProjectsLocationsLakesContentitemsDeleteCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsLakesContentitemsDeleteCall) 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 "dataplex.projects.locations.lakes.contentitems.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 @@ -7239,7 +8092,536 @@ func (c *ProjectsLocationsLakesContentitemsDeleteCall) Do(opts ...googleapi.Call if err := googleapi.CheckResponse(res); err != nil { return nil, err } - ret := &Empty{ + 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": "Delete a content.", + // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/lakes/{lakesId}/contentitems/{contentitemsId}", + // "httpMethod": "DELETE", + // "id": "dataplex.projects.locations.lakes.contentitems.delete", + // "parameterOrder": [ + // "name" + // ], + // "parameters": { + // "name": { + // "description": "Required. The resource name of the content: projects/{project_id}/locations/{location_id}/lakes/{lake_id}/content/{content_id}", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+/lakes/[^/]+/contentitems/.*$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1/{+name}", + // "response": { + // "$ref": "Empty" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "dataplex.projects.locations.lakes.contentitems.get": + +type ProjectsLocationsLakesContentitemsGetCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// Get: Get a content resource. +// +// - name: The resource name of the content: +// projects/{project_id}/locations/{location_id}/lakes/{lake_id}/conten +// t/{content_id}. +func (r *ProjectsLocationsLakesContentitemsService) Get(name string) *ProjectsLocationsLakesContentitemsGetCall { + c := &ProjectsLocationsLakesContentitemsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + return c +} + +// View sets the optional parameter "view": Specify content view to make +// a partial request. +// +// Possible values: +// "CONTENT_VIEW_UNSPECIFIED" - Content view not specified. Defaults +// to BASIC. The API will default to the BASIC view. +// "BASIC" - Will not return the data_text field. +// "FULL" - Returns the complete proto. +func (c *ProjectsLocationsLakesContentitemsGetCall) View(view string) *ProjectsLocationsLakesContentitemsGetCall { + c.urlParams_.Set("view", view) + 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 *ProjectsLocationsLakesContentitemsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsLakesContentitemsGetCall { + 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 *ProjectsLocationsLakesContentitemsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsLakesContentitemsGetCall { + 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 *ProjectsLocationsLakesContentitemsGetCall) Context(ctx context.Context) *ProjectsLocationsLakesContentitemsGetCall { + 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 *ProjectsLocationsLakesContentitemsGetCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsLakesContentitemsGetCall) 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 "dataplex.projects.locations.lakes.contentitems.get" call. +// Exactly one of *GoogleCloudDataplexV1Content or error will be +// non-nil. Any non-2xx status code is an error. Response headers are in +// either *GoogleCloudDataplexV1Content.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 *ProjectsLocationsLakesContentitemsGetCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDataplexV1Content, 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, &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, err + } + ret := &GoogleCloudDataplexV1Content{ + 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": "Get a content resource.", + // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/lakes/{lakesId}/contentitems/{contentitemsId}", + // "httpMethod": "GET", + // "id": "dataplex.projects.locations.lakes.contentitems.get", + // "parameterOrder": [ + // "name" + // ], + // "parameters": { + // "name": { + // "description": "Required. The resource name of the content: projects/{project_id}/locations/{location_id}/lakes/{lake_id}/content/{content_id}", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+/lakes/[^/]+/contentitems/.*$", + // "required": true, + // "type": "string" + // }, + // "view": { + // "description": "Optional. Specify content view to make a partial request.", + // "enum": [ + // "CONTENT_VIEW_UNSPECIFIED", + // "BASIC", + // "FULL" + // ], + // "enumDescriptions": [ + // "Content view not specified. Defaults to BASIC. The API will default to the BASIC view.", + // "Will not return the data_text field.", + // "Returns the complete proto." + // ], + // "location": "query", + // "type": "string" + // } + // }, + // "path": "v1/{+name}", + // "response": { + // "$ref": "GoogleCloudDataplexV1Content" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "dataplex.projects.locations.lakes.contentitems.getIamPolicy": + +type ProjectsLocationsLakesContentitemsGetIamPolicyCall struct { + s *Service + resource string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// GetIamPolicy: Gets the access control policy for a contentitem +// resource. A NOT_FOUND error is returned if the resource does not +// exist. An empty policy is returned if the resource exists but does +// not have a policy set on it.Caller must have Google IAM +// dataplex.content.getIamPolicy permission on the resource. +// +// - 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 *ProjectsLocationsLakesContentitemsService) GetIamPolicy(resource string) *ProjectsLocationsLakesContentitemsGetIamPolicyCall { + c := &ProjectsLocationsLakesContentitemsGetIamPolicyCall{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 *ProjectsLocationsLakesContentitemsGetIamPolicyCall) OptionsRequestedPolicyVersion(optionsRequestedPolicyVersion int64) *ProjectsLocationsLakesContentitemsGetIamPolicyCall { + 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 *ProjectsLocationsLakesContentitemsGetIamPolicyCall) Fields(s ...googleapi.Field) *ProjectsLocationsLakesContentitemsGetIamPolicyCall { + 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 *ProjectsLocationsLakesContentitemsGetIamPolicyCall) IfNoneMatch(entityTag string) *ProjectsLocationsLakesContentitemsGetIamPolicyCall { + 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 *ProjectsLocationsLakesContentitemsGetIamPolicyCall) Context(ctx context.Context) *ProjectsLocationsLakesContentitemsGetIamPolicyCall { + 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 *ProjectsLocationsLakesContentitemsGetIamPolicyCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsLakesContentitemsGetIamPolicyCall) 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 "dataplex.projects.locations.lakes.contentitems.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 *ProjectsLocationsLakesContentitemsGetIamPolicyCall) 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, &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, 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 contentitem resource. A NOT_FOUND error is returned if the resource does not exist. An empty policy is returned if the resource exists but does not have a policy set on it.Caller must have Google IAM dataplex.content.getIamPolicy permission on the resource.", + // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/lakes/{lakesId}/contentitems/{contentitemsId}:getIamPolicy", + // "httpMethod": "GET", + // "id": "dataplex.projects.locations.lakes.contentitems.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/[^/]+/lakes/[^/]+/contentitems/.*$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1/{+resource}:getIamPolicy", + // "response": { + // "$ref": "GoogleIamV1Policy" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "dataplex.projects.locations.lakes.contentitems.list": + +type ProjectsLocationsLakesContentitemsListCall struct { + s *Service + parent string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// List: List content. +// +// - parent: The resource name of the parent lake: +// projects/{project_id}/locations/{location_id}/lakes/{lake_id}. +func (r *ProjectsLocationsLakesContentitemsService) List(parent string) *ProjectsLocationsLakesContentitemsListCall { + c := &ProjectsLocationsLakesContentitemsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + return c +} + +// Filter sets the optional parameter "filter": Filter request. Filters +// are case-sensitive. The following formats are supported:labels.key1 = +// "value1" labels:key1 type = "NOTEBOOK" type = "SQL_SCRIPT"These +// restrictions can be coinjoined with AND, OR and NOT conjunctions. +func (c *ProjectsLocationsLakesContentitemsListCall) Filter(filter string) *ProjectsLocationsLakesContentitemsListCall { + c.urlParams_.Set("filter", filter) + return c +} + +// PageSize sets the optional parameter "pageSize": Maximum number of +// content to return. The service may return fewer than this value. If +// unspecified, at most 10 content will be returned. The maximum value +// is 1000; values above 1000 will be coerced to 1000. +func (c *ProjectsLocationsLakesContentitemsListCall) PageSize(pageSize int64) *ProjectsLocationsLakesContentitemsListCall { + c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) + return c +} + +// PageToken sets the optional parameter "pageToken": Page token +// received from a previous ListContent call. Provide this to retrieve +// the subsequent page. When paginating, all other parameters provided +// to ListContent must match the call that provided the page token. +func (c *ProjectsLocationsLakesContentitemsListCall) PageToken(pageToken string) *ProjectsLocationsLakesContentitemsListCall { + 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 *ProjectsLocationsLakesContentitemsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsLakesContentitemsListCall { + 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 *ProjectsLocationsLakesContentitemsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsLakesContentitemsListCall { + 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 *ProjectsLocationsLakesContentitemsListCall) Context(ctx context.Context) *ProjectsLocationsLakesContentitemsListCall { + 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 *ProjectsLocationsLakesContentitemsListCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsLakesContentitemsListCall) 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}/contentitems") + 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 "dataplex.projects.locations.lakes.contentitems.list" call. +// Exactly one of *GoogleCloudDataplexV1ListContentResponse or error +// will be non-nil. Any non-2xx status code is an error. Response +// headers are in either +// *GoogleCloudDataplexV1ListContentResponse.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 *ProjectsLocationsLakesContentitemsListCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDataplexV1ListContentResponse, 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, &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, err + } + ret := &GoogleCloudDataplexV1ListContentResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -7251,25 +8633,41 @@ func (c *ProjectsLocationsLakesContentitemsDeleteCall) Do(opts ...googleapi.Call } return ret, nil // { - // "description": "Delete a content.", - // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/lakes/{lakesId}/contentitems/{contentitemsId}", - // "httpMethod": "DELETE", - // "id": "dataplex.projects.locations.lakes.contentitems.delete", + // "description": "List content.", + // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/lakes/{lakesId}/contentitems", + // "httpMethod": "GET", + // "id": "dataplex.projects.locations.lakes.contentitems.list", // "parameterOrder": [ - // "name" + // "parent" // ], // "parameters": { - // "name": { - // "description": "Required. The resource name of the content: projects/{project_id}/locations/{location_id}/lakes/{lake_id}/content/{content_id}", + // "filter": { + // "description": "Optional. Filter request. Filters are case-sensitive. The following formats are supported:labels.key1 = \"value1\" labels:key1 type = \"NOTEBOOK\" type = \"SQL_SCRIPT\"These restrictions can be coinjoined with AND, OR and NOT conjunctions.", + // "location": "query", + // "type": "string" + // }, + // "pageSize": { + // "description": "Optional. Maximum number of content to return. The service may return fewer than this value. If unspecified, at most 10 content will be returned. The maximum value is 1000; values above 1000 will be coerced to 1000.", + // "format": "int32", + // "location": "query", + // "type": "integer" + // }, + // "pageToken": { + // "description": "Optional. Page token received from a previous ListContent call. Provide this to retrieve the subsequent page. When paginating, all other parameters provided to ListContent must match the call that provided the page token.", + // "location": "query", + // "type": "string" + // }, + // "parent": { + // "description": "Required. The resource name of the parent lake: projects/{project_id}/locations/{location_id}/lakes/{lake_id}", // "location": "path", - // "pattern": "^projects/[^/]+/locations/[^/]+/lakes/[^/]+/contentitems/.*$", + // "pattern": "^projects/[^/]+/locations/[^/]+/lakes/[^/]+$", // "required": true, // "type": "string" // } // }, - // "path": "v1/{+name}", + // "path": "v1/{+parent}/contentitems", // "response": { - // "$ref": "Empty" + // "$ref": "GoogleCloudDataplexV1ListContentResponse" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -7278,92 +8676,109 @@ func (c *ProjectsLocationsLakesContentitemsDeleteCall) Do(opts ...googleapi.Call } -// method id "dataplex.projects.locations.lakes.contentitems.get": +// 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 *ProjectsLocationsLakesContentitemsListCall) Pages(ctx context.Context, f func(*GoogleCloudDataplexV1ListContentResponse) 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) + } +} -type ProjectsLocationsLakesContentitemsGetCall struct { - s *Service - name string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header +// method id "dataplex.projects.locations.lakes.contentitems.patch": + +type ProjectsLocationsLakesContentitemsPatchCall struct { + s *Service + name string + googleclouddataplexv1content *GoogleCloudDataplexV1Content + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// Get: Get a content resource. +// Patch: Update a content. Only supports full resource update. // -// - name: The resource name of the content: +// - name: Output only. The relative resource name of the content, of +// the form: // projects/{project_id}/locations/{location_id}/lakes/{lake_id}/conten // t/{content_id}. -func (r *ProjectsLocationsLakesContentitemsService) Get(name string) *ProjectsLocationsLakesContentitemsGetCall { - c := &ProjectsLocationsLakesContentitemsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} +func (r *ProjectsLocationsLakesContentitemsService) Patch(name string, googleclouddataplexv1content *GoogleCloudDataplexV1Content) *ProjectsLocationsLakesContentitemsPatchCall { + c := &ProjectsLocationsLakesContentitemsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name + c.googleclouddataplexv1content = googleclouddataplexv1content return c } -// View sets the optional parameter "view": Specify content view to make -// a partial request. -// -// Possible values: -// "CONTENT_VIEW_UNSPECIFIED" - Content view not specified. Defaults -// to BASIC. The API will default to the BASIC view. -// "BASIC" - Will not return the data_text field. -// "FULL" - Returns the complete proto. -func (c *ProjectsLocationsLakesContentitemsGetCall) View(view string) *ProjectsLocationsLakesContentitemsGetCall { - c.urlParams_.Set("view", view) +// UpdateMask sets the optional parameter "updateMask": Required. Mask +// of fields to update. +func (c *ProjectsLocationsLakesContentitemsPatchCall) UpdateMask(updateMask string) *ProjectsLocationsLakesContentitemsPatchCall { + c.urlParams_.Set("updateMask", updateMask) + return c +} + +// ValidateOnly sets the optional parameter "validateOnly": Only +// validate the request, but do not perform mutations. The default is +// false. +func (c *ProjectsLocationsLakesContentitemsPatchCall) ValidateOnly(validateOnly bool) *ProjectsLocationsLakesContentitemsPatchCall { + c.urlParams_.Set("validateOnly", fmt.Sprint(validateOnly)) 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 *ProjectsLocationsLakesContentitemsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsLakesContentitemsGetCall { +func (c *ProjectsLocationsLakesContentitemsPatchCall) Fields(s ...googleapi.Field) *ProjectsLocationsLakesContentitemsPatchCall { 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 *ProjectsLocationsLakesContentitemsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsLakesContentitemsGetCall { - 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 *ProjectsLocationsLakesContentitemsGetCall) Context(ctx context.Context) *ProjectsLocationsLakesContentitemsGetCall { +func (c *ProjectsLocationsLakesContentitemsPatchCall) Context(ctx context.Context) *ProjectsLocationsLakesContentitemsPatchCall { 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 *ProjectsLocationsLakesContentitemsGetCall) Header() http.Header { +func (c *ProjectsLocationsLakesContentitemsPatchCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsLakesContentitemsGetCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsLakesContentitemsPatchCall) 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.googleclouddataplexv1content) + 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("GET", urls, body) + req, err := http.NewRequest("PATCH", urls, body) if err != nil { return nil, err } @@ -7374,14 +8789,14 @@ func (c *ProjectsLocationsLakesContentitemsGetCall) doRequest(alt string) (*http return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "dataplex.projects.locations.lakes.contentitems.get" call. +// Do executes the "dataplex.projects.locations.lakes.contentitems.patch" call. // Exactly one of *GoogleCloudDataplexV1Content or error will be // non-nil. Any non-2xx status code is an error. Response headers are in // either *GoogleCloudDataplexV1Content.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 *ProjectsLocationsLakesContentitemsGetCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDataplexV1Content, error) { +func (c *ProjectsLocationsLakesContentitemsPatchCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDataplexV1Content, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -7412,38 +8827,37 @@ func (c *ProjectsLocationsLakesContentitemsGetCall) Do(opts ...googleapi.CallOpt } return ret, nil // { - // "description": "Get a content resource.", + // "description": "Update a content. Only supports full resource update.", // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/lakes/{lakesId}/contentitems/{contentitemsId}", - // "httpMethod": "GET", - // "id": "dataplex.projects.locations.lakes.contentitems.get", + // "httpMethod": "PATCH", + // "id": "dataplex.projects.locations.lakes.contentitems.patch", // "parameterOrder": [ // "name" // ], // "parameters": { // "name": { - // "description": "Required. The resource name of the content: projects/{project_id}/locations/{location_id}/lakes/{lake_id}/content/{content_id}", + // "description": "Output only. The relative resource name of the content, of the form: projects/{project_id}/locations/{location_id}/lakes/{lake_id}/content/{content_id}", // "location": "path", // "pattern": "^projects/[^/]+/locations/[^/]+/lakes/[^/]+/contentitems/.*$", // "required": true, // "type": "string" // }, - // "view": { - // "description": "Optional. Specify content view to make a partial request.", - // "enum": [ - // "CONTENT_VIEW_UNSPECIFIED", - // "BASIC", - // "FULL" - // ], - // "enumDescriptions": [ - // "Content view not specified. Defaults to BASIC. The API will default to the BASIC view.", - // "Will not return the data_text field.", - // "Returns the complete proto." - // ], + // "updateMask": { + // "description": "Required. Mask of fields to update.", + // "format": "google-fieldmask", // "location": "query", // "type": "string" + // }, + // "validateOnly": { + // "description": "Optional. Only validate the request, but do not perform mutations. The default is false.", + // "location": "query", + // "type": "boolean" // } // }, - // "path": "v1/{+name}", + // "path": "v1/{+name}", + // "request": { + // "$ref": "GoogleCloudDataplexV1Content" + // }, // "response": { // "$ref": "GoogleCloudDataplexV1Content" // }, @@ -7454,125 +8868,93 @@ func (c *ProjectsLocationsLakesContentitemsGetCall) Do(opts ...googleapi.CallOpt } -// method id "dataplex.projects.locations.lakes.contentitems.list": +// method id "dataplex.projects.locations.lakes.contentitems.setIamPolicy": -type ProjectsLocationsLakesContentitemsListCall struct { - s *Service - parent string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header +type ProjectsLocationsLakesContentitemsSetIamPolicyCall struct { + s *Service + resource string + googleiamv1setiampolicyrequest *GoogleIamV1SetIamPolicyRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// List: List content. +// SetIamPolicy: Sets the access control policy on the specified +// contentitem resource. Replaces any existing policy.Caller must have +// Google IAM dataplex.content.setIamPolicy permission on the resource. // -// - parent: The resource name of the parent lake: -// projects/{project_id}/locations/{location_id}/lakes/{lake_id}. -func (r *ProjectsLocationsLakesContentitemsService) List(parent string) *ProjectsLocationsLakesContentitemsListCall { - c := &ProjectsLocationsLakesContentitemsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.parent = parent - return c -} - -// Filter sets the optional parameter "filter": Filter request. Filters -// are case-sensitive. The following formats are supported:labels.key1 = -// "value1" labels:key1 type = "NOTEBOOK" type = "SQL_SCRIPT"These -// restrictions can be coinjoined with AND, OR and NOT conjunctions. -func (c *ProjectsLocationsLakesContentitemsListCall) Filter(filter string) *ProjectsLocationsLakesContentitemsListCall { - c.urlParams_.Set("filter", filter) - return c -} - -// PageSize sets the optional parameter "pageSize": Maximum number of -// content to return. The service may return fewer than this value. If -// unspecified, at most 10 content will be returned. The maximum value -// is 1000; values above 1000 will be coerced to 1000. -func (c *ProjectsLocationsLakesContentitemsListCall) PageSize(pageSize int64) *ProjectsLocationsLakesContentitemsListCall { - c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) - return c -} - -// PageToken sets the optional parameter "pageToken": Page token -// received from a previous ListContent call. Provide this to retrieve -// the subsequent page. When paginating, all other parameters provided -// to ListContent must match the call that provided the page token. -func (c *ProjectsLocationsLakesContentitemsListCall) PageToken(pageToken string) *ProjectsLocationsLakesContentitemsListCall { - c.urlParams_.Set("pageToken", pageToken) +// - 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 *ProjectsLocationsLakesContentitemsService) SetIamPolicy(resource string, googleiamv1setiampolicyrequest *GoogleIamV1SetIamPolicyRequest) *ProjectsLocationsLakesContentitemsSetIamPolicyCall { + c := &ProjectsLocationsLakesContentitemsSetIamPolicyCall{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 *ProjectsLocationsLakesContentitemsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsLakesContentitemsListCall { +func (c *ProjectsLocationsLakesContentitemsSetIamPolicyCall) Fields(s ...googleapi.Field) *ProjectsLocationsLakesContentitemsSetIamPolicyCall { 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 *ProjectsLocationsLakesContentitemsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsLakesContentitemsListCall { - 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 *ProjectsLocationsLakesContentitemsListCall) Context(ctx context.Context) *ProjectsLocationsLakesContentitemsListCall { +func (c *ProjectsLocationsLakesContentitemsSetIamPolicyCall) Context(ctx context.Context) *ProjectsLocationsLakesContentitemsSetIamPolicyCall { 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 *ProjectsLocationsLakesContentitemsListCall) Header() http.Header { +func (c *ProjectsLocationsLakesContentitemsSetIamPolicyCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsLakesContentitemsListCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsLakesContentitemsSetIamPolicyCall) 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.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/{+parent}/contentitems") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+resource}:setIamPolicy") 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{ - "parent": c.parent, + "resource": c.resource, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "dataplex.projects.locations.lakes.contentitems.list" call. -// Exactly one of *GoogleCloudDataplexV1ListContentResponse or error -// will be non-nil. Any non-2xx status code is an error. Response -// headers are in either -// *GoogleCloudDataplexV1ListContentResponse.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 *ProjectsLocationsLakesContentitemsListCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDataplexV1ListContentResponse, error) { +// Do executes the "dataplex.projects.locations.lakes.contentitems.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 *ProjectsLocationsLakesContentitemsSetIamPolicyCall) Do(opts ...googleapi.CallOption) (*GoogleIamV1Policy, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -7591,7 +8973,7 @@ func (c *ProjectsLocationsLakesContentitemsListCall) Do(opts ...googleapi.CallOp if err := googleapi.CheckResponse(res); err != nil { return nil, err } - ret := &GoogleCloudDataplexV1ListContentResponse{ + ret := &GoogleIamV1Policy{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -7603,41 +8985,28 @@ func (c *ProjectsLocationsLakesContentitemsListCall) Do(opts ...googleapi.CallOp } return ret, nil // { - // "description": "List content.", - // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/lakes/{lakesId}/contentitems", - // "httpMethod": "GET", - // "id": "dataplex.projects.locations.lakes.contentitems.list", + // "description": "Sets the access control policy on the specified contentitem resource. Replaces any existing policy.Caller must have Google IAM dataplex.content.setIamPolicy permission on the resource.", + // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/lakes/{lakesId}/contentitems/{contentitemsId}:setIamPolicy", + // "httpMethod": "POST", + // "id": "dataplex.projects.locations.lakes.contentitems.setIamPolicy", // "parameterOrder": [ - // "parent" + // "resource" // ], // "parameters": { - // "filter": { - // "description": "Optional. Filter request. Filters are case-sensitive. The following formats are supported:labels.key1 = \"value1\" labels:key1 type = \"NOTEBOOK\" type = \"SQL_SCRIPT\"These restrictions can be coinjoined with AND, OR and NOT conjunctions.", - // "location": "query", - // "type": "string" - // }, - // "pageSize": { - // "description": "Optional. Maximum number of content to return. The service may return fewer than this value. If unspecified, at most 10 content will be returned. The maximum value is 1000; values above 1000 will be coerced to 1000.", - // "format": "int32", - // "location": "query", - // "type": "integer" - // }, - // "pageToken": { - // "description": "Optional. Page token received from a previous ListContent call. Provide this to retrieve the subsequent page. When paginating, all other parameters provided to ListContent must match the call that provided the page token.", - // "location": "query", - // "type": "string" - // }, - // "parent": { - // "description": "Required. The resource name of the parent lake: projects/{project_id}/locations/{location_id}/lakes/{lake_id}", + // "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/[^/]+/lakes/[^/]+$", + // "pattern": "^projects/[^/]+/locations/[^/]+/lakes/[^/]+/contentitems/.*$", // "required": true, // "type": "string" // } // }, - // "path": "v1/{+parent}/contentitems", + // "path": "v1/{+resource}:setIamPolicy", + // "request": { + // "$ref": "GoogleIamV1SetIamPolicyRequest" + // }, // "response": { - // "$ref": "GoogleCloudDataplexV1ListContentResponse" + // "$ref": "GoogleIamV1Policy" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -7646,70 +9015,40 @@ func (c *ProjectsLocationsLakesContentitemsListCall) Do(opts ...googleapi.CallOp } -// 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 *ProjectsLocationsLakesContentitemsListCall) Pages(ctx context.Context, f func(*GoogleCloudDataplexV1ListContentResponse) 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 "dataplex.projects.locations.lakes.contentitems.patch": +// method id "dataplex.projects.locations.lakes.contentitems.testIamPermissions": -type ProjectsLocationsLakesContentitemsPatchCall struct { - s *Service - name string - googleclouddataplexv1content *GoogleCloudDataplexV1Content - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ProjectsLocationsLakesContentitemsTestIamPermissionsCall struct { + s *Service + resource string + googleiamv1testiampermissionsrequest *GoogleIamV1TestIamPermissionsRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// Patch: Update a content. Only supports full resource update. +// TestIamPermissions: Returns the caller's permissions on a resource. +// If the resource does not exist, an empty set of permissions is +// returned (a NOT_FOUND error is not returned).A caller is not required +// to have Google IAM permission to make this request.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. // -// - name: Output only. The relative resource name of the content, of -// the form: -// projects/{project_id}/locations/{location_id}/lakes/{lake_id}/conten -// t/{content_id}. -func (r *ProjectsLocationsLakesContentitemsService) Patch(name string, googleclouddataplexv1content *GoogleCloudDataplexV1Content) *ProjectsLocationsLakesContentitemsPatchCall { - c := &ProjectsLocationsLakesContentitemsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.name = name - c.googleclouddataplexv1content = googleclouddataplexv1content - return c -} - -// UpdateMask sets the optional parameter "updateMask": Required. Mask -// of fields to update. -func (c *ProjectsLocationsLakesContentitemsPatchCall) UpdateMask(updateMask string) *ProjectsLocationsLakesContentitemsPatchCall { - c.urlParams_.Set("updateMask", updateMask) - return c -} - -// ValidateOnly sets the optional parameter "validateOnly": Only -// validate the request, but do not perform mutations. The default is -// false. -func (c *ProjectsLocationsLakesContentitemsPatchCall) ValidateOnly(validateOnly bool) *ProjectsLocationsLakesContentitemsPatchCall { - c.urlParams_.Set("validateOnly", fmt.Sprint(validateOnly)) +// - 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 *ProjectsLocationsLakesContentitemsService) TestIamPermissions(resource string, googleiamv1testiampermissionsrequest *GoogleIamV1TestIamPermissionsRequest) *ProjectsLocationsLakesContentitemsTestIamPermissionsCall { + c := &ProjectsLocationsLakesContentitemsTestIamPermissionsCall{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 *ProjectsLocationsLakesContentitemsPatchCall) Fields(s ...googleapi.Field) *ProjectsLocationsLakesContentitemsPatchCall { +func (c *ProjectsLocationsLakesContentitemsTestIamPermissionsCall) Fields(s ...googleapi.Field) *ProjectsLocationsLakesContentitemsTestIamPermissionsCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -7717,21 +9056,21 @@ func (c *ProjectsLocationsLakesContentitemsPatchCall) Fields(s ...googleapi.Fiel // 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 *ProjectsLocationsLakesContentitemsPatchCall) Context(ctx context.Context) *ProjectsLocationsLakesContentitemsPatchCall { +func (c *ProjectsLocationsLakesContentitemsTestIamPermissionsCall) Context(ctx context.Context) *ProjectsLocationsLakesContentitemsTestIamPermissionsCall { 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 *ProjectsLocationsLakesContentitemsPatchCall) Header() http.Header { +func (c *ProjectsLocationsLakesContentitemsTestIamPermissionsCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsLakesContentitemsPatchCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsLakesContentitemsTestIamPermissionsCall) 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_ { @@ -7739,34 +9078,35 @@ func (c *ProjectsLocationsLakesContentitemsPatchCall) doRequest(alt string) (*ht } reqHeaders.Set("User-Agent", c.s.userAgent()) var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddataplexv1content) + 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/{+name}") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+resource}:testIamPermissions") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("PATCH", 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, + "resource": c.resource, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "dataplex.projects.locations.lakes.contentitems.patch" call. -// Exactly one of *GoogleCloudDataplexV1Content or error will be -// non-nil. Any non-2xx status code is an error. Response headers are in -// either *GoogleCloudDataplexV1Content.ServerResponse.Header or (if a +// Do executes the "dataplex.projects.locations.lakes.contentitems.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 *ProjectsLocationsLakesContentitemsPatchCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDataplexV1Content, error) { +func (c *ProjectsLocationsLakesContentitemsTestIamPermissionsCall) Do(opts ...googleapi.CallOption) (*GoogleIamV1TestIamPermissionsResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -7785,7 +9125,7 @@ func (c *ProjectsLocationsLakesContentitemsPatchCall) Do(opts ...googleapi.CallO if err := googleapi.CheckResponse(res); err != nil { return nil, err } - ret := &GoogleCloudDataplexV1Content{ + ret := &GoogleIamV1TestIamPermissionsResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -7797,39 +9137,28 @@ func (c *ProjectsLocationsLakesContentitemsPatchCall) Do(opts ...googleapi.CallO } return ret, nil // { - // "description": "Update a content. Only supports full resource update.", - // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/lakes/{lakesId}/contentitems/{contentitemsId}", - // "httpMethod": "PATCH", - // "id": "dataplex.projects.locations.lakes.contentitems.patch", + // "description": "Returns the caller's permissions on a resource. If the resource does not exist, an empty set of permissions is returned (a NOT_FOUND error is not returned).A caller is not required to have Google IAM permission to make this request.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}/lakes/{lakesId}/contentitems/{contentitemsId}:testIamPermissions", + // "httpMethod": "POST", + // "id": "dataplex.projects.locations.lakes.contentitems.testIamPermissions", // "parameterOrder": [ - // "name" + // "resource" // ], // "parameters": { - // "name": { - // "description": "Output only. The relative resource name of the content, of the form: projects/{project_id}/locations/{location_id}/lakes/{lake_id}/content/{content_id}", + // "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/[^/]+/lakes/[^/]+/contentitems/.*$", // "required": true, // "type": "string" - // }, - // "updateMask": { - // "description": "Required. Mask of fields to update.", - // "format": "google-fieldmask", - // "location": "query", - // "type": "string" - // }, - // "validateOnly": { - // "description": "Optional. Only validate the request, but do not perform mutations. The default is false.", - // "location": "query", - // "type": "boolean" // } // }, - // "path": "v1/{+name}", + // "path": "v1/{+resource}:testIamPermissions", // "request": { - // "$ref": "GoogleCloudDataplexV1Content" + // "$ref": "GoogleIamV1TestIamPermissionsRequest" // }, // "response": { - // "$ref": "GoogleCloudDataplexV1Content" + // "$ref": "GoogleIamV1TestIamPermissionsResponse" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" diff --git a/dataproc/v1/dataproc-api.json b/dataproc/v1/dataproc-api.json index 0f85a840c46..9968f51062f 100644 --- a/dataproc/v1/dataproc-api.json +++ b/dataproc/v1/dataproc-api.json @@ -2444,7 +2444,7 @@ } } }, - "revision": "20220511", + "revision": "20220526", "rootUrl": "https://dataproc.googleapis.com/", "schemas": { "AcceleratorConfig": { @@ -2774,7 +2774,7 @@ "id": "Cluster", "properties": { "clusterName": { - "description": "Required. The cluster name. Cluster names within a project must be unique. Names of deleted clusters can be reused.", + "description": "Required. The cluster name, which must be unique within a project. The name must start with a lowercase letter, and can contain up to 51 lowercase letters, numbers, and hyphens. It cannot end with a hyphen. The name of a deleted cluster can be reused.", "type": "string" }, "clusterUuid": { @@ -3425,6 +3425,10 @@ }, "type": "array" }, + "bootDiskKmsKey": { + "description": "Optional. The Customer Managed Encryption Key (CMEK) (https://cloud.google.com/compute/docs/disks/customer-managed-encryption) used to encrypt the boot disk attached to each node in the node pool. Specify the key using the following format: projects/KEY_PROJECT_ID /locations/LOCATION/keyRings/RING_NAME/cryptoKeys/KEY_NAME.", + "type": "string" + }, "localSsdCount": { "description": "Optional. The number of local SSD disks to attach to the node, which is limited by the maximum number of disks allowable per zone (see Adding Local SSDs (https://cloud.google.com/compute/docs/disks/local-ssd)).", "format": "int32", @@ -4471,6 +4475,36 @@ }, "type": "object" }, + "NodePool": { + "description": "indicating a list of workers of same type", + "id": "NodePool", + "properties": { + "id": { + "description": "Required. A unique id of the node pool. Primary and Secondary workers can be specified using special reserved ids PRIMARY_WORKER_POOL and SECONDARY_WORKER_POOL respectively. Aux node pools can be referenced using corresponding pool id.", + "type": "string" + }, + "instanceNames": { + "description": "Name of instances to be repaired. These instances must belong to specified node pool.", + "items": { + "type": "string" + }, + "type": "array" + }, + "repairAction": { + "description": "Required. Repair action to take on specified resources of the node pool.", + "enum": [ + "REPAIR_ACTION_UNSPECIFIED", + "DELETE" + ], + "enumDescriptions": [ + "No action will be taken by default.", + "delete the specified list of nodes." + ], + "type": "string" + } + }, + "type": "object" + }, "Operation": { "description": "This resource represents a long-running operation that is the result of a network API call.", "id": "Operation", @@ -4845,6 +4879,13 @@ "description": "Optional. Specifying the cluster_uuid means the RPC will fail (with error NOT_FOUND) if a cluster with the specified UUID does not exist.", "type": "string" }, + "nodePools": { + "description": "Optional. Node pools and corresponding repair action to be taken. All node pools should be unique in this request. i.e. Multiple entries for the same node pool id are not allowed.", + "items": { + "$ref": "NodePool" + }, + "type": "array" + }, "requestId": { "description": "Optional. A unique ID used to identify the request. If the server receives two RepairClusterRequests with the same ID, the second request is ignored, and the first google.longrunning.Operation created and stored in the backend is returned.Recommendation: Set this value to a UUID (https://en.wikipedia.org/wiki/Universally_unique_identifier).The ID must contain only letters (a-z, A-Z), numbers (0-9), underscores (_), and hyphens (-). The maximum length is 40 characters.", "type": "string" diff --git a/dataproc/v1/dataproc-gen.go b/dataproc/v1/dataproc-gen.go index da8a5573db7..801dc24646f 100644 --- a/dataproc/v1/dataproc-gen.go +++ b/dataproc/v1/dataproc-gen.go @@ -813,8 +813,10 @@ type CancelJobRequest struct { // Cluster: Describes the identifying information, config, and status of // a Dataproc cluster type Cluster struct { - // ClusterName: Required. The cluster name. Cluster names within a - // project must be unique. Names of deleted clusters can be reused. + // ClusterName: Required. The cluster name, which must be unique within + // a project. The name must start with a lowercase letter, and can + // contain up to 51 lowercase letters, numbers, and hyphens. It cannot + // end with a hyphen. The name of a deleted cluster can be reused. ClusterName string `json:"clusterName,omitempty"` // ClusterUuid: Output only. A cluster UUID (Unique Universal @@ -1882,6 +1884,13 @@ type GkeNodeConfig struct { // (https://cloud.google.com/compute/docs/gpus) to attach to each node. Accelerators []*GkeNodePoolAcceleratorConfig `json:"accelerators,omitempty"` + // BootDiskKmsKey: Optional. The Customer Managed Encryption Key (CMEK) + // (https://cloud.google.com/compute/docs/disks/customer-managed-encryption) + // used to encrypt the boot disk attached to each node in the node pool. + // Specify the key using the following format: projects/KEY_PROJECT_ID + // /locations/LOCATION/keyRings/RING_NAME/cryptoKeys/KEY_NAME. + BootDiskKmsKey string `json:"bootDiskKmsKey,omitempty"` + // LocalSsdCount: Optional. The number of local SSD disks to attach to // the node, which is limited by the maximum number of disks allowable // per zone (see Adding Local SSDs @@ -3633,6 +3642,49 @@ func (s *NodeInitializationAction) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// NodePool: indicating a list of workers of same type +type NodePool struct { + // Id: Required. A unique id of the node pool. Primary and Secondary + // workers can be specified using special reserved ids + // PRIMARY_WORKER_POOL and SECONDARY_WORKER_POOL respectively. Aux node + // pools can be referenced using corresponding pool id. + Id string `json:"id,omitempty"` + + // InstanceNames: Name of instances to be repaired. These instances must + // belong to specified node pool. + InstanceNames []string `json:"instanceNames,omitempty"` + + // RepairAction: Required. Repair action to take on specified resources + // of the node pool. + // + // Possible values: + // "REPAIR_ACTION_UNSPECIFIED" - No action will be taken by default. + // "DELETE" - delete the specified list of nodes. + RepairAction string `json:"repairAction,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Id") 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. "Id") 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 *NodePool) MarshalJSON() ([]byte, error) { + type NoMethod NodePool + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // Operation: This resource represents a long-running operation that is // the result of a network API call. type Operation struct { @@ -4238,6 +4290,11 @@ type RepairClusterRequest struct { // not exist. ClusterUuid string `json:"clusterUuid,omitempty"` + // NodePools: Optional. Node pools and corresponding repair action to be + // taken. All node pools should be unique in this request. i.e. Multiple + // entries for the same node pool id are not allowed. + NodePools []*NodePool `json:"nodePools,omitempty"` + // RequestId: Optional. A unique ID used to identify the request. If the // server receives two RepairClusterRequests with the same ID, the // second request is ignored, and the first google.longrunning.Operation diff --git a/file/v1beta1/file-api.json b/file/v1beta1/file-api.json index 8cab6beebba..1b7e167c8a2 100644 --- a/file/v1beta1/file-api.json +++ b/file/v1beta1/file-api.json @@ -577,6 +577,173 @@ } }, "resources": { + "shares": { + "methods": { + "create": { + "description": "Creates a share.", + "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/instances/{instancesId}/shares", + "httpMethod": "POST", + "id": "file.projects.locations.instances.shares.create", + "parameterOrder": [ + "parent" + ], + "parameters": { + "parent": { + "description": "Required. The Filestore Instance to create the share for, in the format `projects/{project_id}/locations/{location}/instances/{instance_id}`", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/instances/[^/]+$", + "required": true, + "type": "string" + }, + "shareId": { + "description": "Required. The ID to use for the share. The ID must be unique within the specified instance. This value must start with a lowercase letter followed by up to 62 lowercase letters, numbers, or hyphens, and cannot end with a hyphen.", + "location": "query", + "type": "string" + } + }, + "path": "v1beta1/{+parent}/shares", + "request": { + "$ref": "Share" + }, + "response": { + "$ref": "Operation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "delete": { + "description": "Deletes a share.", + "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/instances/{instancesId}/shares/{sharesId}", + "httpMethod": "DELETE", + "id": "file.projects.locations.instances.shares.delete", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Required. The share resource name, in the format `projects/{project_id}/locations/{location}/instances/{instance_id}/share/{share_id}`", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/instances/[^/]+/shares/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1beta1/{+name}", + "response": { + "$ref": "Operation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "get": { + "description": "Gets the details of a specific share.", + "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/instances/{instancesId}/shares/{sharesId}", + "httpMethod": "GET", + "id": "file.projects.locations.instances.shares.get", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Required. The share resource name, in the format `projects/{project_id}/locations/{location}/instances/{instance_id}/shares/{share_id}`", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/instances/[^/]+/shares/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1beta1/{+name}", + "response": { + "$ref": "Share" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "list": { + "description": "Lists all shares for a specified instance.", + "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/instances/{instancesId}/shares", + "httpMethod": "GET", + "id": "file.projects.locations.instances.shares.list", + "parameterOrder": [ + "parent" + ], + "parameters": { + "filter": { + "description": "List filter.", + "location": "query", + "type": "string" + }, + "orderBy": { + "description": "Sort results. Supported values are \"name\", \"name desc\" or \"\" (unsorted).", + "location": "query", + "type": "string" + }, + "pageSize": { + "description": "The maximum number of items to return.", + "format": "int32", + "location": "query", + "type": "integer" + }, + "pageToken": { + "description": "The next_page_token value to use if there are additional results to retrieve for this list request.", + "location": "query", + "type": "string" + }, + "parent": { + "description": "Required. The instance for which to retrieve share information, in the format `projects/{project_id}/locations/{location}/instances/{instance_id}`.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/instances/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1beta1/{+parent}/shares", + "response": { + "$ref": "ListSharesResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "patch": { + "description": "Updates the settings of a specific share.", + "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/instances/{instancesId}/shares/{sharesId}", + "httpMethod": "PATCH", + "id": "file.projects.locations.instances.shares.patch", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Output only. The resource name of the share, in the format `projects/{project_id}/locations/{location_id}/instances/{instance_id}/shares/{share_id}`.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/instances/[^/]+/shares/[^/]+$", + "required": true, + "type": "string" + }, + "updateMask": { + "description": "Required. Mask of fields to update. At least one path must be supplied in this field. The elements of the repeated paths field may only include these fields: * \"description\" * \"capacity_gb\" * \"labels\" * \"nfs_export_options\"", + "format": "google-fieldmask", + "location": "query", + "type": "string" + } + }, + "path": "v1beta1/{+name}", + "request": { + "$ref": "Share" + }, + "response": { + "$ref": "Operation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + } + } + }, "snapshots": { "methods": { "create": { @@ -874,7 +1041,7 @@ } } }, - "revision": "20220407", + "revision": "20220530", "rootUrl": "https://file.googleapis.com/", "schemas": { "Backup": { @@ -903,6 +1070,10 @@ "readOnly": true, "type": "string" }, + "kmsKeyName": { + "description": "Immutable. KMS key name used for data encryption.", + "type": "string" + }, "labels": { "additionalProperties": { "type": "string" @@ -1352,6 +1523,17 @@ "description": "A Cloud Filestore instance.", "id": "Instance", "properties": { + "capacityGb": { + "description": "The storage capacity of the instance in gigabytes (GB = 1024^3 bytes). This capacity can be increased up to `max_capacity_gb` GB in multipliers of `capacity_step_size_gb` GB.", + "format": "int64", + "type": "string" + }, + "capacityStepSizeGb": { + "description": "Output only. The increase/decrease capacity step size.", + "format": "int64", + "readOnly": true, + "type": "string" + }, "createTime": { "description": "Output only. The time when the instance was created.", "format": "google-datetime", @@ -1384,6 +1566,22 @@ "description": "Resource labels to represent user provided metadata.", "type": "object" }, + "maxCapacityGb": { + "description": "Output only. The max capacity of the instance.", + "format": "int64", + "readOnly": true, + "type": "string" + }, + "maxShareCount": { + "description": "Output only. The max number of shares allowed.", + "format": "int64", + "readOnly": true, + "type": "string" + }, + "multiShareEnabled": { + "description": "Indicates whether this instance uses a multi-share configuration with which it can have more than one file-share or none at all. File-shares are added, updated and removed through the separate file-share APIs.", + "type": "boolean" + }, "name": { "description": "Output only. The resource name of the instance, in the format `projects/{project_id}/locations/{location_id}/instances/{instance_id}`.", "readOnly": true, @@ -1560,6 +1758,31 @@ }, "type": "object" }, + "ListSharesResponse": { + "description": "ListSharesResponse is the result of ListSharesRequest.", + "id": "ListSharesResponse", + "properties": { + "nextPageToken": { + "description": "The token you can use to retrieve the next page of results. Not returned if there are no more results in the list.", + "type": "string" + }, + "shares": { + "description": "A list of shares in the project for the specified instance.", + "items": { + "$ref": "Share" + }, + "type": "array" + }, + "unreachable": { + "description": "Locations that could not be reached.", + "items": { + "type": "string" + }, + "type": "array" + } + }, + "type": "object" + }, "ListSnapshotsResponse": { "description": "ListSnapshotsResponse is the result of ListSnapshotsRequest.", "id": "ListSnapshotsResponse", @@ -1930,6 +2153,68 @@ }, "type": "object" }, + "Share": { + "description": "A Cloud Filestore share.", + "id": "Share", + "properties": { + "capacityGb": { + "description": "File share capacity in gigabytes (GB). Cloud Filestore defines 1 GB as 1024^3 bytes. Must be greater than 0.", + "format": "int64", + "type": "string" + }, + "createTime": { + "description": "Output only. The time when the share was created.", + "format": "google-datetime", + "readOnly": true, + "type": "string" + }, + "description": { + "description": "A description of the share with 2048 characters or less. Requests with longer descriptions will be rejected.", + "type": "string" + }, + "labels": { + "additionalProperties": { + "type": "string" + }, + "description": "Resource labels to represent user provided metadata.", + "type": "object" + }, + "mountName": { + "description": "The mount name of the share. Must be 63 characters or less and consist of uppercase or lowercase letters, numbers, and underscores.", + "type": "string" + }, + "name": { + "description": "Output only. The resource name of the share, in the format `projects/{project_id}/locations/{location_id}/instances/{instance_id}/shares/{share_id}`.", + "readOnly": true, + "type": "string" + }, + "nfsExportOptions": { + "description": "Nfs Export Options. There is a limit of 10 export options per file share.", + "items": { + "$ref": "NfsExportOptions" + }, + "type": "array" + }, + "state": { + "description": "Output only. The share state.", + "enum": [ + "STATE_UNSPECIFIED", + "CREATING", + "READY", + "DELETING" + ], + "enumDescriptions": [ + "State not set.", + "Share is being created.", + "Share is ready for use.", + "Share is being deleted." + ], + "readOnly": true, + "type": "string" + } + }, + "type": "object" + }, "Snapshot": { "description": "A Cloud Filestore snapshot.", "id": "Snapshot", diff --git a/file/v1beta1/file-gen.go b/file/v1beta1/file-gen.go index b90d0338136..969af516c48 100644 --- a/file/v1beta1/file-gen.go +++ b/file/v1beta1/file-gen.go @@ -178,6 +178,7 @@ type ProjectsLocationsBackupsService struct { func NewProjectsLocationsInstancesService(s *Service) *ProjectsLocationsInstancesService { rs := &ProjectsLocationsInstancesService{s: s} + rs.Shares = NewProjectsLocationsInstancesSharesService(s) rs.Snapshots = NewProjectsLocationsInstancesSnapshotsService(s) return rs } @@ -185,9 +186,20 @@ func NewProjectsLocationsInstancesService(s *Service) *ProjectsLocationsInstance type ProjectsLocationsInstancesService struct { s *Service + Shares *ProjectsLocationsInstancesSharesService + Snapshots *ProjectsLocationsInstancesSnapshotsService } +func NewProjectsLocationsInstancesSharesService(s *Service) *ProjectsLocationsInstancesSharesService { + rs := &ProjectsLocationsInstancesSharesService{s: s} + return rs +} + +type ProjectsLocationsInstancesSharesService struct { + s *Service +} + func NewProjectsLocationsInstancesSnapshotsService(s *Service) *ProjectsLocationsInstancesSnapshotsService { rs := &ProjectsLocationsInstancesSnapshotsService{s: s} return rs @@ -223,6 +235,9 @@ type Backup struct { // if the backup is restored DownloadBytes int64 `json:"downloadBytes,omitempty,string"` + // KmsKeyName: Immutable. KMS key name used for data encryption. + KmsKeyName string `json:"kmsKeyName,omitempty"` + // Labels: Resource labels to represent user provided metadata. Labels map[string]string `json:"labels,omitempty"` @@ -949,6 +964,15 @@ func (s *GoogleCloudSaasacceleratorManagementProvidersV1SloMetadata) MarshalJSON // Instance: A Cloud Filestore instance. type Instance struct { + // CapacityGb: The storage capacity of the instance in gigabytes (GB = + // 1024^3 bytes). This capacity can be increased up to `max_capacity_gb` + // GB in multipliers of `capacity_step_size_gb` GB. + CapacityGb int64 `json:"capacityGb,omitempty,string"` + + // CapacityStepSizeGb: Output only. The increase/decrease capacity step + // size. + CapacityStepSizeGb int64 `json:"capacityStepSizeGb,omitempty,string"` + // CreateTime: Output only. The time when the instance was created. CreateTime string `json:"createTime,omitempty"` @@ -970,6 +994,18 @@ type Instance struct { // Labels: Resource labels to represent user provided metadata. Labels map[string]string `json:"labels,omitempty"` + // MaxCapacityGb: Output only. The max capacity of the instance. + MaxCapacityGb int64 `json:"maxCapacityGb,omitempty,string"` + + // MaxShareCount: Output only. The max number of shares allowed. + MaxShareCount int64 `json:"maxShareCount,omitempty,string"` + + // MultiShareEnabled: Indicates whether this instance uses a multi-share + // configuration with which it can have more than one file-share or none + // at all. File-shares are added, updated and removed through the + // separate file-share APIs. + MultiShareEnabled bool `json:"multiShareEnabled,omitempty"` + // Name: Output only. The resource name of the instance, in the format // `projects/{project_id}/locations/{location_id}/instances/{instance_id} // `. @@ -1040,7 +1076,7 @@ type Instance struct { // server. googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "CreateTime") to + // ForceSendFields is a list of field names (e.g. "CapacityGb") 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 @@ -1048,7 +1084,7 @@ type Instance struct { // 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 + // NullFields is a list of field names (e.g. "CapacityGb") 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 @@ -1227,6 +1263,46 @@ func (s *ListOperationsResponse) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// ListSharesResponse: ListSharesResponse is the result of +// ListSharesRequest. +type ListSharesResponse struct { + // NextPageToken: The token you can use to retrieve the next page of + // results. Not returned if there are no more results in the list. + NextPageToken string `json:"nextPageToken,omitempty"` + + // Shares: A list of shares in the project for the specified instance. + Shares []*Share `json:"shares,omitempty"` + + // Unreachable: Locations that could not be reached. + Unreachable []string `json:"unreachable,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the + // server. + googleapi.ServerResponse `json:"-"` + + // ForceSendFields is a list of field names (e.g. "NextPageToken") 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. "NextPageToken") 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 *ListSharesResponse) MarshalJSON() ([]byte, error) { + type NoMethod ListSharesResponse + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // ListSnapshotsResponse: ListSnapshotsResponse is the result of // ListSnapshotsRequest. type ListSnapshotsResponse struct { @@ -1783,6 +1859,72 @@ func (s *Schedule) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// Share: A Cloud Filestore share. +type Share struct { + // CapacityGb: File share capacity in gigabytes (GB). Cloud Filestore + // defines 1 GB as 1024^3 bytes. Must be greater than 0. + CapacityGb int64 `json:"capacityGb,omitempty,string"` + + // CreateTime: Output only. The time when the share was created. + CreateTime string `json:"createTime,omitempty"` + + // Description: A description of the share with 2048 characters or less. + // Requests with longer descriptions will be rejected. + Description string `json:"description,omitempty"` + + // Labels: Resource labels to represent user provided metadata. + Labels map[string]string `json:"labels,omitempty"` + + // MountName: The mount name of the share. Must be 63 characters or less + // and consist of uppercase or lowercase letters, numbers, and + // underscores. + MountName string `json:"mountName,omitempty"` + + // Name: Output only. The resource name of the share, in the format + // `projects/{project_id}/locations/{location_id}/instances/{instance_id} + // /shares/{share_id}`. + Name string `json:"name,omitempty"` + + // NfsExportOptions: Nfs Export Options. There is a limit of 10 export + // options per file share. + NfsExportOptions []*NfsExportOptions `json:"nfsExportOptions,omitempty"` + + // State: Output only. The share state. + // + // Possible values: + // "STATE_UNSPECIFIED" - State not set. + // "CREATING" - Share is being created. + // "READY" - Share is ready for use. + // "DELETING" - Share is being deleted. + State string `json:"state,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the + // server. + googleapi.ServerResponse `json:"-"` + + // ForceSendFields is a list of field names (e.g. "CapacityGb") 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. "CapacityGb") 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 *Share) MarshalJSON() ([]byte, error) { + type NoMethod Share + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // Snapshot: A Cloud Filestore snapshot. type Snapshot struct { // CreateTime: Output only. The time when the snapshot was created. @@ -4315,6 +4457,826 @@ func (c *ProjectsLocationsInstancesRevertCall) Do(opts ...googleapi.CallOption) } +// method id "file.projects.locations.instances.shares.create": + +type ProjectsLocationsInstancesSharesCreateCall struct { + s *Service + parent string + share *Share + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Create: Creates a share. +// +// - parent: The Filestore Instance to create the share for, in the +// format +// `projects/{project_id}/locations/{location}/instances/{instance_id}`. +func (r *ProjectsLocationsInstancesSharesService) Create(parent string, share *Share) *ProjectsLocationsInstancesSharesCreateCall { + c := &ProjectsLocationsInstancesSharesCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + c.share = share + return c +} + +// ShareId sets the optional parameter "shareId": Required. The ID to +// use for the share. The ID must be unique within the specified +// instance. This value must start with a lowercase letter followed by +// up to 62 lowercase letters, numbers, or hyphens, and cannot end with +// a hyphen. +func (c *ProjectsLocationsInstancesSharesCreateCall) ShareId(shareId string) *ProjectsLocationsInstancesSharesCreateCall { + c.urlParams_.Set("shareId", shareId) + 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 *ProjectsLocationsInstancesSharesCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsInstancesSharesCreateCall { + 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 *ProjectsLocationsInstancesSharesCreateCall) Context(ctx context.Context) *ProjectsLocationsInstancesSharesCreateCall { + 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 *ProjectsLocationsInstancesSharesCreateCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsInstancesSharesCreateCall) 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.share) + 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, "v1beta1/{+parent}/shares") + 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 "file.projects.locations.instances.shares.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 *ProjectsLocationsInstancesSharesCreateCall) 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, &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, 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 share.", + // "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/instances/{instancesId}/shares", + // "httpMethod": "POST", + // "id": "file.projects.locations.instances.shares.create", + // "parameterOrder": [ + // "parent" + // ], + // "parameters": { + // "parent": { + // "description": "Required. The Filestore Instance to create the share for, in the format `projects/{project_id}/locations/{location}/instances/{instance_id}`", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+/instances/[^/]+$", + // "required": true, + // "type": "string" + // }, + // "shareId": { + // "description": "Required. The ID to use for the share. The ID must be unique within the specified instance. This value must start with a lowercase letter followed by up to 62 lowercase letters, numbers, or hyphens, and cannot end with a hyphen.", + // "location": "query", + // "type": "string" + // } + // }, + // "path": "v1beta1/{+parent}/shares", + // "request": { + // "$ref": "Share" + // }, + // "response": { + // "$ref": "Operation" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "file.projects.locations.instances.shares.delete": + +type ProjectsLocationsInstancesSharesDeleteCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Delete: Deletes a share. +// +// - name: The share resource name, in the format +// `projects/{project_id}/locations/{location}/instances/{instance_id}/ +// share/{share_id}`. +func (r *ProjectsLocationsInstancesSharesService) Delete(name string) *ProjectsLocationsInstancesSharesDeleteCall { + c := &ProjectsLocationsInstancesSharesDeleteCall{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 *ProjectsLocationsInstancesSharesDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsInstancesSharesDeleteCall { + 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 *ProjectsLocationsInstancesSharesDeleteCall) Context(ctx context.Context) *ProjectsLocationsInstancesSharesDeleteCall { + 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 *ProjectsLocationsInstancesSharesDeleteCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsInstancesSharesDeleteCall) 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, "v1beta1/{+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 "file.projects.locations.instances.shares.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 *ProjectsLocationsInstancesSharesDeleteCall) 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, &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, 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 share.", + // "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/instances/{instancesId}/shares/{sharesId}", + // "httpMethod": "DELETE", + // "id": "file.projects.locations.instances.shares.delete", + // "parameterOrder": [ + // "name" + // ], + // "parameters": { + // "name": { + // "description": "Required. The share resource name, in the format `projects/{project_id}/locations/{location}/instances/{instance_id}/share/{share_id}`", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+/instances/[^/]+/shares/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1beta1/{+name}", + // "response": { + // "$ref": "Operation" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "file.projects.locations.instances.shares.get": + +type ProjectsLocationsInstancesSharesGetCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// Get: Gets the details of a specific share. +// +// - name: The share resource name, in the format +// `projects/{project_id}/locations/{location}/instances/{instance_id}/ +// shares/{share_id}`. +func (r *ProjectsLocationsInstancesSharesService) Get(name string) *ProjectsLocationsInstancesSharesGetCall { + c := &ProjectsLocationsInstancesSharesGetCall{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 *ProjectsLocationsInstancesSharesGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsInstancesSharesGetCall { + 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 *ProjectsLocationsInstancesSharesGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsInstancesSharesGetCall { + 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 *ProjectsLocationsInstancesSharesGetCall) Context(ctx context.Context) *ProjectsLocationsInstancesSharesGetCall { + 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 *ProjectsLocationsInstancesSharesGetCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsInstancesSharesGetCall) 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}") + 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 "file.projects.locations.instances.shares.get" call. +// Exactly one of *Share or error will be non-nil. Any non-2xx status +// code is an error. Response headers are in either +// *Share.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 *ProjectsLocationsInstancesSharesGetCall) Do(opts ...googleapi.CallOption) (*Share, 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, &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, err + } + ret := &Share{ + 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 details of a specific share.", + // "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/instances/{instancesId}/shares/{sharesId}", + // "httpMethod": "GET", + // "id": "file.projects.locations.instances.shares.get", + // "parameterOrder": [ + // "name" + // ], + // "parameters": { + // "name": { + // "description": "Required. The share resource name, in the format `projects/{project_id}/locations/{location}/instances/{instance_id}/shares/{share_id}`", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+/instances/[^/]+/shares/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1beta1/{+name}", + // "response": { + // "$ref": "Share" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "file.projects.locations.instances.shares.list": + +type ProjectsLocationsInstancesSharesListCall struct { + s *Service + parent string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// List: Lists all shares for a specified instance. +// +// - parent: The instance for which to retrieve share information, in +// the format +// `projects/{project_id}/locations/{location}/instances/{instance_id}` +// . +func (r *ProjectsLocationsInstancesSharesService) List(parent string) *ProjectsLocationsInstancesSharesListCall { + c := &ProjectsLocationsInstancesSharesListCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + return c +} + +// Filter sets the optional parameter "filter": List filter. +func (c *ProjectsLocationsInstancesSharesListCall) Filter(filter string) *ProjectsLocationsInstancesSharesListCall { + c.urlParams_.Set("filter", filter) + return c +} + +// OrderBy sets the optional parameter "orderBy": Sort results. +// Supported values are "name", "name desc" or "" (unsorted). +func (c *ProjectsLocationsInstancesSharesListCall) OrderBy(orderBy string) *ProjectsLocationsInstancesSharesListCall { + c.urlParams_.Set("orderBy", orderBy) + return c +} + +// PageSize sets the optional parameter "pageSize": The maximum number +// of items to return. +func (c *ProjectsLocationsInstancesSharesListCall) PageSize(pageSize int64) *ProjectsLocationsInstancesSharesListCall { + c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) + return c +} + +// PageToken sets the optional parameter "pageToken": The +// next_page_token value to use if there are additional results to +// retrieve for this list request. +func (c *ProjectsLocationsInstancesSharesListCall) PageToken(pageToken string) *ProjectsLocationsInstancesSharesListCall { + 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 *ProjectsLocationsInstancesSharesListCall) Fields(s ...googleapi.Field) *ProjectsLocationsInstancesSharesListCall { + 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 *ProjectsLocationsInstancesSharesListCall) IfNoneMatch(entityTag string) *ProjectsLocationsInstancesSharesListCall { + 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 *ProjectsLocationsInstancesSharesListCall) Context(ctx context.Context) *ProjectsLocationsInstancesSharesListCall { + 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 *ProjectsLocationsInstancesSharesListCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsInstancesSharesListCall) 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/{+parent}/shares") + 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 "file.projects.locations.instances.shares.list" call. +// Exactly one of *ListSharesResponse or error will be non-nil. Any +// non-2xx status code is an error. Response headers are in either +// *ListSharesResponse.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 *ProjectsLocationsInstancesSharesListCall) Do(opts ...googleapi.CallOption) (*ListSharesResponse, 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, &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, err + } + ret := &ListSharesResponse{ + 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 all shares for a specified instance.", + // "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/instances/{instancesId}/shares", + // "httpMethod": "GET", + // "id": "file.projects.locations.instances.shares.list", + // "parameterOrder": [ + // "parent" + // ], + // "parameters": { + // "filter": { + // "description": "List filter.", + // "location": "query", + // "type": "string" + // }, + // "orderBy": { + // "description": "Sort results. Supported values are \"name\", \"name desc\" or \"\" (unsorted).", + // "location": "query", + // "type": "string" + // }, + // "pageSize": { + // "description": "The maximum number of items to return.", + // "format": "int32", + // "location": "query", + // "type": "integer" + // }, + // "pageToken": { + // "description": "The next_page_token value to use if there are additional results to retrieve for this list request.", + // "location": "query", + // "type": "string" + // }, + // "parent": { + // "description": "Required. The instance for which to retrieve share information, in the format `projects/{project_id}/locations/{location}/instances/{instance_id}`.", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+/instances/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1beta1/{+parent}/shares", + // "response": { + // "$ref": "ListSharesResponse" + // }, + // "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 *ProjectsLocationsInstancesSharesListCall) Pages(ctx context.Context, f func(*ListSharesResponse) 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 "file.projects.locations.instances.shares.patch": + +type ProjectsLocationsInstancesSharesPatchCall struct { + s *Service + name string + share *Share + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Patch: Updates the settings of a specific share. +// +// - name: Output only. The resource name of the share, in the format +// `projects/{project_id}/locations/{location_id}/instances/{instance_i +// d}/shares/{share_id}`. +func (r *ProjectsLocationsInstancesSharesService) Patch(name string, share *Share) *ProjectsLocationsInstancesSharesPatchCall { + c := &ProjectsLocationsInstancesSharesPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + c.share = share + return c +} + +// UpdateMask sets the optional parameter "updateMask": Required. Mask +// of fields to update. At least one path must be supplied in this +// field. The elements of the repeated paths field may only include +// these fields: * "description" * "capacity_gb" * "labels" * +// "nfs_export_options" +func (c *ProjectsLocationsInstancesSharesPatchCall) UpdateMask(updateMask string) *ProjectsLocationsInstancesSharesPatchCall { + 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 *ProjectsLocationsInstancesSharesPatchCall) Fields(s ...googleapi.Field) *ProjectsLocationsInstancesSharesPatchCall { + 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 *ProjectsLocationsInstancesSharesPatchCall) Context(ctx context.Context) *ProjectsLocationsInstancesSharesPatchCall { + 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 *ProjectsLocationsInstancesSharesPatchCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsInstancesSharesPatchCall) 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.share) + 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, "v1beta1/{+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 "file.projects.locations.instances.shares.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 *ProjectsLocationsInstancesSharesPatchCall) 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, &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, 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 settings of a specific share.", + // "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/instances/{instancesId}/shares/{sharesId}", + // "httpMethod": "PATCH", + // "id": "file.projects.locations.instances.shares.patch", + // "parameterOrder": [ + // "name" + // ], + // "parameters": { + // "name": { + // "description": "Output only. The resource name of the share, in the format `projects/{project_id}/locations/{location_id}/instances/{instance_id}/shares/{share_id}`.", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+/instances/[^/]+/shares/[^/]+$", + // "required": true, + // "type": "string" + // }, + // "updateMask": { + // "description": "Required. Mask of fields to update. At least one path must be supplied in this field. The elements of the repeated paths field may only include these fields: * \"description\" * \"capacity_gb\" * \"labels\" * \"nfs_export_options\"", + // "format": "google-fieldmask", + // "location": "query", + // "type": "string" + // } + // }, + // "path": "v1beta1/{+name}", + // "request": { + // "$ref": "Share" + // }, + // "response": { + // "$ref": "Operation" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + // method id "file.projects.locations.instances.snapshots.create": type ProjectsLocationsInstancesSnapshotsCreateCall struct { diff --git a/firebase/v1beta1/firebase-api.json b/firebase/v1beta1/firebase-api.json index 5a9c1ce24b6..37793c77aa9 100644 --- a/firebase/v1beta1/firebase-api.json +++ b/firebase/v1beta1/firebase-api.json @@ -624,34 +624,6 @@ "https://www.googleapis.com/auth/cloud-platform", "https://www.googleapis.com/auth/firebase" ] - }, - "remove": { - "description": "Removes the specified AndroidApp from the project.", - "flatPath": "v1beta1/projects/{projectsId}/androidApps/{androidAppsId}:remove", - "httpMethod": "POST", - "id": "firebase.projects.androidApps.remove", - "parameterOrder": [ - "name" - ], - "parameters": { - "name": { - "description": "Required. The resource name of the AndroidApp, in the format: projects/ PROJECT_IDENTIFIER/androidApps/APP_ID Since an APP_ID is a unique identifier, the Unique Resource from Sub-Collection access pattern may be used here, in the format: projects/-/androidApps/APP_ID Refer to the AndroidApp [name](../projects.androidApps#AndroidApp.FIELDS.name) field for details about PROJECT_IDENTIFIER and APP_ID values.", - "location": "path", - "pattern": "^projects/[^/]+/androidApps/[^/]+$", - "required": true, - "type": "string" - } - }, - "path": "v1beta1/{+name}:remove", - "request": { - "$ref": "RemoveAndroidAppRequest" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ] } }, "resources": { @@ -980,34 +952,6 @@ "https://www.googleapis.com/auth/cloud-platform", "https://www.googleapis.com/auth/firebase" ] - }, - "remove": { - "description": "Removes the specified IosApp from the project.", - "flatPath": "v1beta1/projects/{projectsId}/iosApps/{iosAppsId}:remove", - "httpMethod": "POST", - "id": "firebase.projects.iosApps.remove", - "parameterOrder": [ - "name" - ], - "parameters": { - "name": { - "description": "Required. The resource name of the IosApp, in the format: projects/ PROJECT_IDENTIFIER/iosApps/APP_ID Since an APP_ID is a unique identifier, the Unique Resource from Sub-Collection access pattern may be used here, in the format: projects/-/iosApps/APP_ID Refer to the IosApp [name](../projects.iosApps#IosApp.FIELDS.name) field for details about PROJECT_IDENTIFIER and APP_ID values.", - "location": "path", - "pattern": "^projects/[^/]+/iosApps/[^/]+$", - "required": true, - "type": "string" - } - }, - "path": "v1beta1/{+name}:remove", - "request": { - "$ref": "RemoveIosAppRequest" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ] } } }, @@ -1171,41 +1115,13 @@ "https://www.googleapis.com/auth/cloud-platform", "https://www.googleapis.com/auth/firebase" ] - }, - "remove": { - "description": "Removes the specified WebApp from the project.", - "flatPath": "v1beta1/projects/{projectsId}/webApps/{webAppsId}:remove", - "httpMethod": "POST", - "id": "firebase.projects.webApps.remove", - "parameterOrder": [ - "name" - ], - "parameters": { - "name": { - "description": "Required. The resource name of the WebApp, in the format: projects/ PROJECT_IDENTIFIER/webApps/APP_ID Since an APP_ID is a unique identifier, the Unique Resource from Sub-Collection access pattern may be used here, in the format: projects/-/webApps/APP_ID Refer to the WebApp [name](../projects.webApps#WebApp.FIELDS.name) field for details about PROJECT_IDENTIFIER and APP_ID values.", - "location": "path", - "pattern": "^projects/[^/]+/webApps/[^/]+$", - "required": true, - "type": "string" - } - }, - "path": "v1beta1/{+name}:remove", - "request": { - "$ref": "RemoveWebAppRequest" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ] } } } } } }, - "revision": "20220531", + "revision": "20220602", "rootUrl": "https://firebase.googleapis.com/", "schemas": { "AddFirebaseRequest": { @@ -1746,60 +1662,6 @@ }, "type": "object" }, - "RemoveAndroidAppRequest": { - "id": "RemoveAndroidAppRequest", - "properties": { - "allowMissing": { - "description": "If set to true, and the App is not found, the request will succeed but no action will be taken on the server.", - "type": "boolean" - }, - "etag": { - "description": "Checksum provided in the AndroidApp entity, which if provided ensures the client has an up-to-date value before proceeding.", - "type": "string" - }, - "validateOnly": { - "description": "If set to true, only validate the request and do not delete the app.", - "type": "boolean" - } - }, - "type": "object" - }, - "RemoveIosAppRequest": { - "id": "RemoveIosAppRequest", - "properties": { - "allowMissing": { - "description": "If set to true, and the App is not found, the request will succeed but no action will be taken on the server.", - "type": "boolean" - }, - "etag": { - "description": "Checksum provided in the IosApp entity, which if provided ensures the client has an up-to-date value before proceeding.", - "type": "string" - }, - "validateOnly": { - "description": "If set to true, only validate the request and do not delete the app.", - "type": "boolean" - } - }, - "type": "object" - }, - "RemoveWebAppRequest": { - "id": "RemoveWebAppRequest", - "properties": { - "allowMissing": { - "description": "If set to true, and the App is not found, the request will succeed but no action will be taken on the server.", - "type": "boolean" - }, - "etag": { - "description": "Checksum provided in the WebApp entity, which if provided ensures the client has an up-to-date value before proceeding.", - "type": "string" - }, - "validateOnly": { - "description": "If set to true, only validate the request and do not delete the app.", - "type": "boolean" - } - }, - "type": "object" - }, "SearchFirebaseAppsResponse": { "id": "SearchFirebaseAppsResponse", "properties": { diff --git a/firebase/v1beta1/firebase-gen.go b/firebase/v1beta1/firebase-gen.go index c176c8b0988..e26407872b2 100644 --- a/firebase/v1beta1/firebase-gen.go +++ b/firebase/v1beta1/firebase-gen.go @@ -1402,114 +1402,6 @@ func (s *RemoveAnalyticsRequest) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -type RemoveAndroidAppRequest struct { - // AllowMissing: If set to true, and the App is not found, the request - // will succeed but no action will be taken on the server. - AllowMissing bool `json:"allowMissing,omitempty"` - - // Etag: Checksum provided in the AndroidApp entity, which if provided - // ensures the client has an up-to-date value before proceeding. - Etag string `json:"etag,omitempty"` - - // ValidateOnly: If set to true, only validate the request and do not - // delete the app. - ValidateOnly bool `json:"validateOnly,omitempty"` - - // ForceSendFields is a list of field names (e.g. "AllowMissing") 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. "AllowMissing") 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 *RemoveAndroidAppRequest) MarshalJSON() ([]byte, error) { - type NoMethod RemoveAndroidAppRequest - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -type RemoveIosAppRequest struct { - // AllowMissing: If set to true, and the App is not found, the request - // will succeed but no action will be taken on the server. - AllowMissing bool `json:"allowMissing,omitempty"` - - // Etag: Checksum provided in the IosApp entity, which if provided - // ensures the client has an up-to-date value before proceeding. - Etag string `json:"etag,omitempty"` - - // ValidateOnly: If set to true, only validate the request and do not - // delete the app. - ValidateOnly bool `json:"validateOnly,omitempty"` - - // ForceSendFields is a list of field names (e.g. "AllowMissing") 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. "AllowMissing") 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 *RemoveIosAppRequest) MarshalJSON() ([]byte, error) { - type NoMethod RemoveIosAppRequest - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -type RemoveWebAppRequest struct { - // AllowMissing: If set to true, and the App is not found, the request - // will succeed but no action will be taken on the server. - AllowMissing bool `json:"allowMissing,omitempty"` - - // Etag: Checksum provided in the WebApp entity, which if provided - // ensures the client has an up-to-date value before proceeding. - Etag string `json:"etag,omitempty"` - - // ValidateOnly: If set to true, only validate the request and do not - // delete the app. - ValidateOnly bool `json:"validateOnly,omitempty"` - - // ForceSendFields is a list of field names (e.g. "AllowMissing") 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. "AllowMissing") 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 *RemoveWebAppRequest) MarshalJSON() ([]byte, error) { - type NoMethod RemoveWebAppRequest - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - type SearchFirebaseAppsResponse struct { // Apps: One page of results from a call to `SearchFirebaseApps`. Apps []*FirebaseAppInfo `json:"apps,omitempty"` @@ -4650,154 +4542,6 @@ func (c *ProjectsAndroidAppsPatchCall) Do(opts ...googleapi.CallOption) (*Androi } -// method id "firebase.projects.androidApps.remove": - -type ProjectsAndroidAppsRemoveCall struct { - s *Service - nameid string - removeandroidapprequest *RemoveAndroidAppRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Remove: Removes the specified AndroidApp from the project. -// -// - name: The resource name of the AndroidApp, in the format: projects/ -// PROJECT_IDENTIFIER/androidApps/APP_ID Since an APP_ID is a unique -// identifier, the Unique Resource from Sub-Collection access pattern -// may be used here, in the format: projects/-/androidApps/APP_ID -// Refer to the AndroidApp name -// (../projects.androidApps#AndroidApp.FIELDS.name) field for details -// about PROJECT_IDENTIFIER and APP_ID values. -func (r *ProjectsAndroidAppsService) Remove(nameid string, removeandroidapprequest *RemoveAndroidAppRequest) *ProjectsAndroidAppsRemoveCall { - c := &ProjectsAndroidAppsRemoveCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.nameid = nameid - c.removeandroidapprequest = removeandroidapprequest - 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 *ProjectsAndroidAppsRemoveCall) Fields(s ...googleapi.Field) *ProjectsAndroidAppsRemoveCall { - 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 *ProjectsAndroidAppsRemoveCall) Context(ctx context.Context) *ProjectsAndroidAppsRemoveCall { - 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 *ProjectsAndroidAppsRemoveCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *ProjectsAndroidAppsRemoveCall) 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.removeandroidapprequest) - 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, "v1beta1/{+name}:remove") - 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.nameid, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "firebase.projects.androidApps.remove" 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 *ProjectsAndroidAppsRemoveCall) 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, &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, 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 the specified AndroidApp from the project.", - // "flatPath": "v1beta1/projects/{projectsId}/androidApps/{androidAppsId}:remove", - // "httpMethod": "POST", - // "id": "firebase.projects.androidApps.remove", - // "parameterOrder": [ - // "name" - // ], - // "parameters": { - // "name": { - // "description": "Required. The resource name of the AndroidApp, in the format: projects/ PROJECT_IDENTIFIER/androidApps/APP_ID Since an APP_ID is a unique identifier, the Unique Resource from Sub-Collection access pattern may be used here, in the format: projects/-/androidApps/APP_ID Refer to the AndroidApp [name](../projects.androidApps#AndroidApp.FIELDS.name) field for details about PROJECT_IDENTIFIER and APP_ID values.", - // "location": "path", - // "pattern": "^projects/[^/]+/androidApps/[^/]+$", - // "required": true, - // "type": "string" - // } - // }, - // "path": "v1beta1/{+name}:remove", - // "request": { - // "$ref": "RemoveAndroidAppRequest" - // }, - // "response": { - // "$ref": "Operation" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform" - // ] - // } - -} - // method id "firebase.projects.androidApps.sha.create": type ProjectsAndroidAppsShaCreateCall struct { @@ -6478,153 +6222,6 @@ func (c *ProjectsIosAppsPatchCall) Do(opts ...googleapi.CallOption) (*IosApp, er } -// method id "firebase.projects.iosApps.remove": - -type ProjectsIosAppsRemoveCall struct { - s *Service - nameid string - removeiosapprequest *RemoveIosAppRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Remove: Removes the specified IosApp from the project. -// -// - name: The resource name of the IosApp, in the format: projects/ -// PROJECT_IDENTIFIER/iosApps/APP_ID Since an APP_ID is a unique -// identifier, the Unique Resource from Sub-Collection access pattern -// may be used here, in the format: projects/-/iosApps/APP_ID Refer to -// the IosApp name (../projects.iosApps#IosApp.FIELDS.name) field for -// details about PROJECT_IDENTIFIER and APP_ID values. -func (r *ProjectsIosAppsService) Remove(nameid string, removeiosapprequest *RemoveIosAppRequest) *ProjectsIosAppsRemoveCall { - c := &ProjectsIosAppsRemoveCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.nameid = nameid - c.removeiosapprequest = removeiosapprequest - 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 *ProjectsIosAppsRemoveCall) Fields(s ...googleapi.Field) *ProjectsIosAppsRemoveCall { - 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 *ProjectsIosAppsRemoveCall) Context(ctx context.Context) *ProjectsIosAppsRemoveCall { - 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 *ProjectsIosAppsRemoveCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *ProjectsIosAppsRemoveCall) 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.removeiosapprequest) - 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, "v1beta1/{+name}:remove") - 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.nameid, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "firebase.projects.iosApps.remove" 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 *ProjectsIosAppsRemoveCall) 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, &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, 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 the specified IosApp from the project.", - // "flatPath": "v1beta1/projects/{projectsId}/iosApps/{iosAppsId}:remove", - // "httpMethod": "POST", - // "id": "firebase.projects.iosApps.remove", - // "parameterOrder": [ - // "name" - // ], - // "parameters": { - // "name": { - // "description": "Required. The resource name of the IosApp, in the format: projects/ PROJECT_IDENTIFIER/iosApps/APP_ID Since an APP_ID is a unique identifier, the Unique Resource from Sub-Collection access pattern may be used here, in the format: projects/-/iosApps/APP_ID Refer to the IosApp [name](../projects.iosApps#IosApp.FIELDS.name) field for details about PROJECT_IDENTIFIER and APP_ID values.", - // "location": "path", - // "pattern": "^projects/[^/]+/iosApps/[^/]+$", - // "required": true, - // "type": "string" - // } - // }, - // "path": "v1beta1/{+name}:remove", - // "request": { - // "$ref": "RemoveIosAppRequest" - // }, - // "response": { - // "$ref": "Operation" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform" - // ] - // } - -} - // method id "firebase.projects.webApps.create": type ProjectsWebAppsCreateCall struct { @@ -7458,150 +7055,3 @@ func (c *ProjectsWebAppsPatchCall) Do(opts ...googleapi.CallOption) (*WebApp, er // } } - -// method id "firebase.projects.webApps.remove": - -type ProjectsWebAppsRemoveCall struct { - s *Service - nameid string - removewebapprequest *RemoveWebAppRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Remove: Removes the specified WebApp from the project. -// -// - name: The resource name of the WebApp, in the format: projects/ -// PROJECT_IDENTIFIER/webApps/APP_ID Since an APP_ID is a unique -// identifier, the Unique Resource from Sub-Collection access pattern -// may be used here, in the format: projects/-/webApps/APP_ID Refer to -// the WebApp name (../projects.webApps#WebApp.FIELDS.name) field for -// details about PROJECT_IDENTIFIER and APP_ID values. -func (r *ProjectsWebAppsService) Remove(nameid string, removewebapprequest *RemoveWebAppRequest) *ProjectsWebAppsRemoveCall { - c := &ProjectsWebAppsRemoveCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.nameid = nameid - c.removewebapprequest = removewebapprequest - 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 *ProjectsWebAppsRemoveCall) Fields(s ...googleapi.Field) *ProjectsWebAppsRemoveCall { - 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 *ProjectsWebAppsRemoveCall) Context(ctx context.Context) *ProjectsWebAppsRemoveCall { - 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 *ProjectsWebAppsRemoveCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *ProjectsWebAppsRemoveCall) 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.removewebapprequest) - 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, "v1beta1/{+name}:remove") - 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.nameid, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "firebase.projects.webApps.remove" 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 *ProjectsWebAppsRemoveCall) 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, &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, 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 the specified WebApp from the project.", - // "flatPath": "v1beta1/projects/{projectsId}/webApps/{webAppsId}:remove", - // "httpMethod": "POST", - // "id": "firebase.projects.webApps.remove", - // "parameterOrder": [ - // "name" - // ], - // "parameters": { - // "name": { - // "description": "Required. The resource name of the WebApp, in the format: projects/ PROJECT_IDENTIFIER/webApps/APP_ID Since an APP_ID is a unique identifier, the Unique Resource from Sub-Collection access pattern may be used here, in the format: projects/-/webApps/APP_ID Refer to the WebApp [name](../projects.webApps#WebApp.FIELDS.name) field for details about PROJECT_IDENTIFIER and APP_ID values.", - // "location": "path", - // "pattern": "^projects/[^/]+/webApps/[^/]+$", - // "required": true, - // "type": "string" - // } - // }, - // "path": "v1beta1/{+name}:remove", - // "request": { - // "$ref": "RemoveWebAppRequest" - // }, - // "response": { - // "$ref": "Operation" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform" - // ] - // } - -} diff --git a/firebasedatabase/v1beta/firebasedatabase-api.json b/firebasedatabase/v1beta/firebasedatabase-api.json index e0da6fcaa4e..fe5c01097d3 100644 --- a/firebasedatabase/v1beta/firebasedatabase-api.json +++ b/firebasedatabase/v1beta/firebasedatabase-api.json @@ -351,7 +351,7 @@ } } }, - "revision": "20220330", + "revision": "20220602", "rootUrl": "https://firebasedatabase.googleapis.com/", "schemas": { "DatabaseInstance": { @@ -359,7 +359,8 @@ "id": "DatabaseInstance", "properties": { "databaseUrl": { - "description": "Immutable. The globally unique hostname of the database.", + "description": "Output only. Output Only. The globally unique hostname of the database.", + "readOnly": true, "type": "string" }, "name": { @@ -367,11 +368,12 @@ "type": "string" }, "project": { - "description": "The resource name of the project this instance belongs to. For example: `projects/{project-number}`.", + "description": "Output only. The resource name of the project this instance belongs to. For example: `projects/{project-number}`.", + "readOnly": true, "type": "string" }, "state": { - "description": "The database's lifecycle state. Read-only.", + "description": "Output only. The database's lifecycle state. Read-only.", "enum": [ "LIFECYCLE_STATE_UNSPECIFIED", "ACTIVE", @@ -384,10 +386,11 @@ "The database is in a disabled state. It can be re-enabled later.", "The database is in a deleted state." ], + "readOnly": true, "type": "string" }, "type": { - "description": "The database instance type. On creation only USER_DATABASE is allowed, which is also the default when omitted.", + "description": "Immutable. The database instance type. On creation only USER_DATABASE is allowed, which is also the default when omitted.", "enum": [ "DATABASE_INSTANCE_TYPE_UNSPECIFIED", "DEFAULT_DATABASE", diff --git a/firebasedatabase/v1beta/firebasedatabase-gen.go b/firebasedatabase/v1beta/firebasedatabase-gen.go index e81c5feb335..6c44c74a4af 100644 --- a/firebasedatabase/v1beta/firebasedatabase-gen.go +++ b/firebasedatabase/v1beta/firebasedatabase-gen.go @@ -191,7 +191,8 @@ type ProjectsLocationsInstancesService struct { // Details on interacting with contents of a DatabaseInstance can be // found at: https://firebase.google.com/docs/database/rest/start. type DatabaseInstance struct { - // DatabaseUrl: Immutable. The globally unique hostname of the database. + // DatabaseUrl: Output only. Output Only. The globally unique hostname + // of the database. DatabaseUrl string `json:"databaseUrl,omitempty"` // Name: The fully qualified resource name of the database instance, in @@ -200,11 +201,11 @@ type DatabaseInstance struct { // -id}`. Name string `json:"name,omitempty"` - // Project: The resource name of the project this instance belongs to. - // For example: `projects/{project-number}`. + // Project: Output only. The resource name of the project this instance + // belongs to. For example: `projects/{project-number}`. Project string `json:"project,omitempty"` - // State: The database's lifecycle state. Read-only. + // State: Output only. The database's lifecycle state. Read-only. // // Possible values: // "LIFECYCLE_STATE_UNSPECIFIED" - Unspecified state, likely the @@ -216,8 +217,8 @@ type DatabaseInstance struct { // "DELETED" - The database is in a deleted state. State string `json:"state,omitempty"` - // Type: The database instance type. On creation only USER_DATABASE is - // allowed, which is also the default when omitted. + // Type: Immutable. The database instance type. On creation only + // USER_DATABASE is allowed, which is also the default when omitted. // // Possible values: // "DATABASE_INSTANCE_TYPE_UNSPECIFIED" - Unknown state, likely the diff --git a/iam/v1/iam-api.json b/iam/v1/iam-api.json index b55232f1ea4..f42540199e9 100644 --- a/iam/v1/iam-api.json +++ b/iam/v1/iam-api.json @@ -1921,7 +1921,7 @@ } } }, - "revision": "20220511", + "revision": "20220526", "rootUrl": "https://iam.googleapis.com/", "schemas": { "AdminAuditData": { @@ -3087,6 +3087,12 @@ }, "type": "object" }, + "WorkloadIdentityPoolOperationMetadata": { + "description": "Metadata for long-running WorkloadIdentityPool operations.", + "id": "WorkloadIdentityPoolOperationMetadata", + "properties": {}, + "type": "object" + }, "WorkloadIdentityPoolProvider": { "description": "A configuration for an external identity provider.", "id": "WorkloadIdentityPoolProvider", diff --git a/iam/v1/iam-gen.go b/iam/v1/iam-gen.go index 5265d9f1dd5..c1bf2168c27 100644 --- a/iam/v1/iam-gen.go +++ b/iam/v1/iam-gen.go @@ -2700,6 +2700,11 @@ func (s *WorkloadIdentityPool) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// WorkloadIdentityPoolOperationMetadata: Metadata for long-running +// WorkloadIdentityPool operations. +type WorkloadIdentityPoolOperationMetadata struct { +} + // WorkloadIdentityPoolProvider: A configuration for an external // identity provider. type WorkloadIdentityPoolProvider struct { diff --git a/iam/v2beta/iam-api.json b/iam/v2beta/iam-api.json index c8996ada6e3..55edaac654e 100644 --- a/iam/v2beta/iam-api.json +++ b/iam/v2beta/iam-api.json @@ -293,7 +293,7 @@ } } }, - "revision": "20220421", + "revision": "20220526", "rootUrl": "https://iam.googleapis.com/", "schemas": { "GoogleIamAdminV1AuditData": { @@ -386,6 +386,12 @@ }, "type": "object" }, + "GoogleIamV1betaWorkloadIdentityPoolOperationMetadata": { + "description": "Metadata for long-running WorkloadIdentityPool operations.", + "id": "GoogleIamV1betaWorkloadIdentityPoolOperationMetadata", + "properties": {}, + "type": "object" + }, "GoogleIamV2betaDenyRule": { "description": "A deny rule in an IAM deny policy.", "id": "GoogleIamV2betaDenyRule", diff --git a/iam/v2beta/iam-gen.go b/iam/v2beta/iam-gen.go index 20b4604a720..8ccd3e372a3 100644 --- a/iam/v2beta/iam-gen.go +++ b/iam/v2beta/iam-gen.go @@ -329,6 +329,11 @@ func (s *GoogleIamV1PolicyDelta) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// GoogleIamV1betaWorkloadIdentityPoolOperationMetadata: Metadata for +// long-running WorkloadIdentityPool operations. +type GoogleIamV1betaWorkloadIdentityPoolOperationMetadata struct { +} + // GoogleIamV2betaDenyRule: A deny rule in an IAM deny policy. type GoogleIamV2betaDenyRule struct { // DenialCondition: The condition that determines whether this deny rule diff --git a/networkmanagement/v1beta1/networkmanagement-api.json b/networkmanagement/v1beta1/networkmanagement-api.json index 5b920e8cdb6..2e0c8d11edb 100644 --- a/networkmanagement/v1beta1/networkmanagement-api.json +++ b/networkmanagement/v1beta1/networkmanagement-api.json @@ -591,7 +591,7 @@ } } }, - "revision": "20220504", + "revision": "20220526", "rootUrl": "https://networkmanagement.googleapis.com/", "schemas": { "AbortInfo": { @@ -1145,13 +1145,15 @@ "FIREWALL_RULE_TYPE_UNSPECIFIED", "HIERARCHICAL_FIREWALL_POLICY_RULE", "VPC_FIREWALL_RULE", - "IMPLIED_VPC_FIREWALL_RULE" + "IMPLIED_VPC_FIREWALL_RULE", + "SERVICE_MANAGED_FIREWALL_RULE" ], "enumDescriptions": [ "Unspecified type.", "Hierarchical firewall policy rule. For details, see [Hierarchical firewall policies overview](https://cloud.google.com/vpc/docs/firewall-policies).", "VPC firewall rule. For details, see [VPC firewall rules overview](https://cloud.google.com/vpc/docs/firewalls).", - "Implied VPC firewall rule. For details, see [Implied rules](https://cloud.google.com/vpc/docs/firewalls#default_firewall_rules)." + "Implied VPC firewall rule. For details, see [Implied rules](https://cloud.google.com/vpc/docs/firewalls#default_firewall_rules).", + "Implicit firewall rules that are created by services, such as [VPC connector's implicit rule](https://cloud.google.com/functions/docs/networking/connecting-vpc#restrict-access) for allowing ingress access. These rules are managed by services and not visible in the Google Cloud console." ], "type": "string" }, diff --git a/networkmanagement/v1beta1/networkmanagement-gen.go b/networkmanagement/v1beta1/networkmanagement-gen.go index a8a766717d1..9ea80eef435 100644 --- a/networkmanagement/v1beta1/networkmanagement-gen.go +++ b/networkmanagement/v1beta1/networkmanagement-gen.go @@ -1111,6 +1111,11 @@ type FirewallInfo struct { // details, see [Implied // rules](https://cloud.google.com/vpc/docs/firewalls#default_firewall_ru // les). + // "SERVICE_MANAGED_FIREWALL_RULE" - Implicit firewall rules that are + // created by services, such as [VPC connector's implicit + // rule](https://cloud.google.com/functions/docs/networking/connecting-vp + // c#restrict-access) for allowing ingress access. These rules are + // managed by services and not visible in the Google Cloud console. FirewallRuleType string `json:"firewallRuleType,omitempty"` // NetworkUri: The URI of the VPC network that the firewall rule is diff --git a/spanner/v1/spanner-api.json b/spanner/v1/spanner-api.json index 542a823825e..8c5d689e0d7 100644 --- a/spanner/v1/spanner-api.json +++ b/spanner/v1/spanner-api.json @@ -1430,6 +1430,47 @@ } }, "resources": { + "databaseRoles": { + "methods": { + "list": { + "description": "Lists Cloud Spanner database roles.", + "flatPath": "v1/projects/{projectsId}/instances/{instancesId}/databases/{databasesId}/databaseRoles", + "httpMethod": "GET", + "id": "spanner.projects.instances.databases.databaseRoles.list", + "parameterOrder": [ + "parent" + ], + "parameters": { + "pageSize": { + "description": "Number of database roles to be returned in the response. If 0 or less, defaults to the server's maximum allowed page size.", + "format": "int32", + "location": "query", + "type": "integer" + }, + "pageToken": { + "description": "If non-empty, `page_token` should contain a next_page_token from a previous ListDatabaseRolesResponse.", + "location": "query", + "type": "string" + }, + "parent": { + "description": "Required. The database whose roles should be listed. Values are of the form `projects//instances//databases//databaseRoles`.", + "location": "path", + "pattern": "^projects/[^/]+/instances/[^/]+/databases/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1/{+parent}/databaseRoles", + "response": { + "$ref": "ListDatabaseRolesResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/spanner.admin" + ] + } + } + }, "operations": { "methods": { "cancel": { @@ -2192,7 +2233,7 @@ } } }, - "revision": "20220413", + "revision": "20220531", "rootUrl": "https://spanner.googleapis.com/", "schemas": { "Backup": { @@ -2779,6 +2820,17 @@ }, "type": "object" }, + "DatabaseRole": { + "description": "A Cloud Spanner database role.", + "id": "DatabaseRole", + "properties": { + "name": { + "description": "Required. The name of the database role. Values are of the form `projects//instances//databases//databaseRoles/ {role}`, where `` is as specified in the `CREATE ROLE` DDL statement. This name can be passed to Get/Set IAMPolicy methods to identify the database role.", + "type": "string" + } + }, + "type": "object" + }, "Delete": { "description": "Arguments to delete operations.", "id": "Delete", @@ -3401,6 +3453,24 @@ }, "type": "object" }, + "ListDatabaseRolesResponse": { + "description": "The response for ListDatabaseRoles.", + "id": "ListDatabaseRolesResponse", + "properties": { + "databaseRoles": { + "description": "Database roles that matched the request.", + "items": { + "$ref": "DatabaseRole" + }, + "type": "array" + }, + "nextPageToken": { + "description": "`next_page_token` can be sent in a subsequent ListDatabaseRoles call to fetch more of the matching roles.", + "type": "string" + } + }, + "type": "object" + }, "ListDatabasesResponse": { "description": "The response for ListDatabases.", "id": "ListDatabasesResponse", @@ -4442,6 +4512,10 @@ "readOnly": true, "type": "string" }, + "creatorRole": { + "description": "The database role which created this session.", + "type": "string" + }, "labels": { "additionalProperties": { "type": "string" @@ -4600,7 +4674,7 @@ "type": "object" }, "TransactionOptions": { - "description": "Transactions: Each session can have at most one active transaction at a time (note that standalone reads and queries use a transaction internally and do count towards the one transaction limit). After the active transaction is completed, the session can immediately be re-used for the next transaction. It is not necessary to create a new session for each transaction. Transaction modes: Cloud Spanner supports three transaction modes: 1. Locking read-write. This type of transaction is the only way to write data into Cloud Spanner. These transactions rely on pessimistic locking and, if necessary, two-phase commit. Locking read-write transactions may abort, requiring the application to retry. 2. Snapshot read-only. This transaction type provides guaranteed consistency across several reads, but does not allow writes. Snapshot read-only transactions can be configured to read at timestamps in the past. Snapshot read-only transactions do not need to be committed. 3. Partitioned DML. This type of transaction is used to execute a single Partitioned DML statement. Partitioned DML partitions the key space and runs the DML statement over each partition in parallel using separate, internal transactions that commit independently. Partitioned DML transactions do not need to be committed. For transactions that only read, snapshot read-only transactions provide simpler semantics and are almost always faster. In particular, read-only transactions do not take locks, so they do not conflict with read-write transactions. As a consequence of not taking locks, they also do not abort, so retry loops are not needed. Transactions may only read-write data in a single database. They may, however, read-write data in different tables within that database. Locking read-write transactions: Locking transactions may be used to atomically read-modify-write data anywhere in a database. This type of transaction is externally consistent. Clients should attempt to minimize the amount of time a transaction is active. Faster transactions commit with higher probability and cause less contention. Cloud Spanner attempts to keep read locks active as long as the transaction continues to do reads, and the transaction has not been terminated by Commit or Rollback. Long periods of inactivity at the client may cause Cloud Spanner to release a transaction's locks and abort it. Conceptually, a read-write transaction consists of zero or more reads or SQL statements followed by Commit. At any time before Commit, the client can send a Rollback request to abort the transaction. Semantics: Cloud Spanner can commit the transaction if all read locks it acquired are still valid at commit time, and it is able to acquire write locks for all writes. Cloud Spanner can abort the transaction for any reason. If a commit attempt returns `ABORTED`, Cloud Spanner guarantees that the transaction has not modified any user data in Cloud Spanner. Unless the transaction commits, Cloud Spanner makes no guarantees about how long the transaction's locks were held for. It is an error to use Cloud Spanner locks for any sort of mutual exclusion other than between Cloud Spanner transactions themselves. Retrying aborted transactions: When a transaction aborts, the application can choose to retry the whole transaction again. To maximize the chances of successfully committing the retry, the client should execute the retry in the same session as the original attempt. The original session's lock priority increases with each consecutive abort, meaning that each attempt has a slightly better chance of success than the previous. Under some circumstances (for example, many transactions attempting to modify the same row(s)), a transaction can abort many times in a short period before successfully committing. Thus, it is not a good idea to cap the number of retries a transaction can attempt; instead, it is better to limit the total amount of time spent retrying. Idle transactions: A transaction is considered idle if it has no outstanding reads or SQL queries and has not started a read or SQL query within the last 10 seconds. Idle transactions can be aborted by Cloud Spanner so that they don't hold on to locks indefinitely. If an idle transaction is aborted, the commit will fail with error `ABORTED`. If this behavior is undesirable, periodically executing a simple SQL query in the transaction (for example, `SELECT 1`) prevents the transaction from becoming idle. Snapshot read-only transactions: Snapshot read-only transactions provides a simpler method than locking read-write transactions for doing several consistent reads. However, this type of transaction does not support writes. Snapshot transactions do not take locks. Instead, they work by choosing a Cloud Spanner timestamp, then executing all reads at that timestamp. Since they do not acquire locks, they do not block concurrent read-write transactions. Unlike locking read-write transactions, snapshot read-only transactions never abort. They can fail if the chosen read timestamp is garbage collected; however, the default garbage collection policy is generous enough that most applications do not need to worry about this in practice. Snapshot read-only transactions do not need to call Commit or Rollback (and in fact are not permitted to do so). To execute a snapshot transaction, the client specifies a timestamp bound, which tells Cloud Spanner how to choose a read timestamp. The types of timestamp bound are: - Strong (the default). - Bounded staleness. - Exact staleness. If the Cloud Spanner database to be read is geographically distributed, stale read-only transactions can execute more quickly than strong or read-write transactions, because they are able to execute far from the leader replica. Each type of timestamp bound is discussed in detail below. Strong: Strong reads are guaranteed to see the effects of all transactions that have committed before the start of the read. Furthermore, all rows yielded by a single read are consistent with each other -- if any part of the read observes a transaction, all parts of the read see the transaction. Strong reads are not repeatable: two consecutive strong read-only transactions might return inconsistent results if there are concurrent writes. If consistency across reads is required, the reads should be executed within a transaction or at an exact read timestamp. See TransactionOptions.ReadOnly.strong. Exact staleness: These timestamp bounds execute reads at a user-specified timestamp. Reads at a timestamp are guaranteed to see a consistent prefix of the global transaction history: they observe modifications done by all transactions with a commit timestamp less than or equal to the read timestamp, and observe none of the modifications done by transactions with a larger commit timestamp. They will block until all conflicting transactions that may be assigned commit timestamps \u003c= the read timestamp have finished. The timestamp can either be expressed as an absolute Cloud Spanner commit timestamp or a staleness relative to the current time. These modes do not require a \"negotiation phase\" to pick a timestamp. As a result, they execute slightly faster than the equivalent boundedly stale concurrency modes. On the other hand, boundedly stale reads usually return fresher results. See TransactionOptions.ReadOnly.read_timestamp and TransactionOptions.ReadOnly.exact_staleness. Bounded staleness: Bounded staleness modes allow Cloud Spanner to pick the read timestamp, subject to a user-provided staleness bound. Cloud Spanner chooses the newest timestamp within the staleness bound that allows execution of the reads at the closest available replica without blocking. All rows yielded are consistent with each other -- if any part of the read observes a transaction, all parts of the read see the transaction. Boundedly stale reads are not repeatable: two stale reads, even if they use the same staleness bound, can execute at different timestamps and thus return inconsistent results. Boundedly stale reads execute in two phases: the first phase negotiates a timestamp among all replicas needed to serve the read. In the second phase, reads are executed at the negotiated timestamp. As a result of the two phase execution, bounded staleness reads are usually a little slower than comparable exact staleness reads. However, they are typically able to return fresher results, and are more likely to execute at the closest replica. Because the timestamp negotiation requires up-front knowledge of which rows will be read, it can only be used with single-use read-only transactions. See TransactionOptions.ReadOnly.max_staleness and TransactionOptions.ReadOnly.min_read_timestamp. Old read timestamps and garbage collection: Cloud Spanner continuously garbage collects deleted and overwritten data in the background to reclaim storage space. This process is known as \"version GC\". By default, version GC reclaims versions after they are one hour old. Because of this, Cloud Spanner cannot perform reads at read timestamps more than one hour in the past. This restriction also applies to in-progress reads and/or SQL queries whose timestamp become too old while executing. Reads and SQL queries with too-old read timestamps fail with the error `FAILED_PRECONDITION`. You can configure and extend the `VERSION_RETENTION_PERIOD` of a database up to a period as long as one week, which allows Cloud Spanner to perform reads up to one week in the past. Partitioned DML transactions: Partitioned DML transactions are used to execute DML statements with a different execution strategy that provides different, and often better, scalability properties for large, table-wide operations than DML in a ReadWrite transaction. Smaller scoped statements, such as an OLTP workload, should prefer using ReadWrite transactions. Partitioned DML partitions the keyspace and runs the DML statement on each partition in separate, internal transactions. These transactions commit automatically when complete, and run independently from one another. To reduce lock contention, this execution strategy only acquires read locks on rows that match the WHERE clause of the statement. Additionally, the smaller per-partition transactions hold locks for less time. That said, Partitioned DML is not a drop-in replacement for standard DML used in ReadWrite transactions. - The DML statement must be fully-partitionable. Specifically, the statement must be expressible as the union of many statements which each access only a single row of the table. - The statement is not applied atomically to all rows of the table. Rather, the statement is applied atomically to partitions of the table, in independent transactions. Secondary index rows are updated atomically with the base table rows. - Partitioned DML does not guarantee exactly-once execution semantics against a partition. The statement will be applied at least once to each partition. It is strongly recommended that the DML statement should be idempotent to avoid unexpected results. For instance, it is potentially dangerous to run a statement such as `UPDATE table SET column = column + 1` as it could be run multiple times against some rows. - The partitions are committed automatically - there is no support for Commit or Rollback. If the call returns an error, or if the client issuing the ExecuteSql call dies, it is possible that some rows had the statement executed on them successfully. It is also possible that statement was never executed against other rows. - Partitioned DML transactions may only contain the execution of a single DML statement via ExecuteSql or ExecuteStreamingSql. - If any error is encountered during the execution of the partitioned DML operation (for instance, a UNIQUE INDEX violation, division by zero, or a value that cannot be stored due to schema constraints), then the operation is stopped at that point and an error is returned. It is possible that at this point, some partitions have been committed (or even committed multiple times), and other partitions have not been run at all. Given the above, Partitioned DML is good fit for large, database-wide, operations that are idempotent, such as deleting old rows from a very large table.", + "description": "In addition, if TransactionOptions.read_only.return_read_timestamp is set to true, a special value of 2^63 - 2 will be returned in the Transaction message that describes the transaction, instead of a valid read timestamp. This special value should be discarded and not used for any subsequent queries. Please see https://cloud.google.com/spanner/docs/change-streams for more details on how to query the change stream TVFs. Partitioned DML transactions: Partitioned DML transactions are used to execute DML statements with a different execution strategy that provides different, and often better, scalability properties for large, table-wide operations than DML in a ReadWrite transaction. Smaller scoped statements, such as an OLTP workload, should prefer using ReadWrite transactions. Partitioned DML partitions the keyspace and runs the DML statement on each partition in separate, internal transactions. These transactions commit automatically when complete, and run independently from one another. To reduce lock contention, this execution strategy only acquires read locks on rows that match the WHERE clause of the statement. Additionally, the smaller per-partition transactions hold locks for less time. That said, Partitioned DML is not a drop-in replacement for standard DML used in ReadWrite transactions. - The DML statement must be fully-partitionable. Specifically, the statement must be expressible as the union of many statements which each access only a single row of the table. - The statement is not applied atomically to all rows of the table. Rather, the statement is applied atomically to partitions of the table, in independent transactions. Secondary index rows are updated atomically with the base table rows. - Partitioned DML does not guarantee exactly-once execution semantics against a partition. The statement will be applied at least once to each partition. It is strongly recommended that the DML statement should be idempotent to avoid unexpected results. For instance, it is potentially dangerous to run a statement such as `UPDATE table SET column = column + 1` as it could be run multiple times against some rows. - The partitions are committed automatically - there is no support for Commit or Rollback. If the call returns an error, or if the client issuing the ExecuteSql call dies, it is possible that some rows had the statement executed on them successfully. It is also possible that statement was never executed against other rows. - Partitioned DML transactions may only contain the execution of a single DML statement via ExecuteSql or ExecuteStreamingSql. - If any error is encountered during the execution of the partitioned DML operation (for instance, a UNIQUE INDEX violation, division by zero, or a value that cannot be stored due to schema constraints), then the operation is stopped at that point and an error is returned. It is possible that at this point, some partitions have been committed (or even committed multiple times), and other partitions have not been run at all. Given the above, Partitioned DML is good fit for large, database-wide, operations that are idempotent, such as deleting old rows from a very large table.", "id": "TransactionOptions", "properties": { "partitionedDml": { diff --git a/spanner/v1/spanner-gen.go b/spanner/v1/spanner-gen.go index bd09c32fd01..6ac99044fae 100644 --- a/spanner/v1/spanner-gen.go +++ b/spanner/v1/spanner-gen.go @@ -255,6 +255,7 @@ type ProjectsInstancesDatabaseOperationsService struct { func NewProjectsInstancesDatabasesService(s *Service) *ProjectsInstancesDatabasesService { rs := &ProjectsInstancesDatabasesService{s: s} + rs.DatabaseRoles = NewProjectsInstancesDatabasesDatabaseRolesService(s) rs.Operations = NewProjectsInstancesDatabasesOperationsService(s) rs.Sessions = NewProjectsInstancesDatabasesSessionsService(s) return rs @@ -263,11 +264,22 @@ func NewProjectsInstancesDatabasesService(s *Service) *ProjectsInstancesDatabase type ProjectsInstancesDatabasesService struct { s *Service + DatabaseRoles *ProjectsInstancesDatabasesDatabaseRolesService + Operations *ProjectsInstancesDatabasesOperationsService Sessions *ProjectsInstancesDatabasesSessionsService } +func NewProjectsInstancesDatabasesDatabaseRolesService(s *Service) *ProjectsInstancesDatabasesDatabaseRolesService { + rs := &ProjectsInstancesDatabasesDatabaseRolesService{s: s} + return rs +} + +type ProjectsInstancesDatabasesDatabaseRolesService struct { + s *Service +} + func NewProjectsInstancesDatabasesOperationsService(s *Service) *ProjectsInstancesDatabasesOperationsService { rs := &ProjectsInstancesDatabasesOperationsService{s: s} return rs @@ -1345,6 +1357,37 @@ func (s *Database) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// DatabaseRole: A Cloud Spanner database role. +type DatabaseRole struct { + // Name: Required. The name of the database role. Values are of the form + // `projects//instances//databases//databaseRoles/ {role}`, where `` is + // as specified in the `CREATE ROLE` DDL statement. This name can be + // passed to Get/Set IAMPolicy methods to identify the database role. + Name string `json:"name,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Name") 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. "Name") 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 *DatabaseRole) MarshalJSON() ([]byte, error) { + type NoMethod DatabaseRole + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // Delete: Arguments to delete operations. type Delete struct { // KeySet: Required. The primary keys of the rows within table to @@ -2532,6 +2575,42 @@ func (s *ListDatabaseOperationsResponse) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// ListDatabaseRolesResponse: The response for ListDatabaseRoles. +type ListDatabaseRolesResponse struct { + // DatabaseRoles: Database roles that matched the request. + DatabaseRoles []*DatabaseRole `json:"databaseRoles,omitempty"` + + // NextPageToken: `next_page_token` can be sent in a subsequent + // ListDatabaseRoles call to fetch more of the matching roles. + 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. "DatabaseRoles") 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. "DatabaseRoles") 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 *ListDatabaseRolesResponse) MarshalJSON() ([]byte, error) { + type NoMethod ListDatabaseRolesResponse + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // ListDatabasesResponse: The response for ListDatabases. type ListDatabasesResponse struct { // Databases: Databases that matched the request. @@ -4483,6 +4562,9 @@ type Session struct { // CreateTime: Output only. The timestamp when the session is created. CreateTime string `json:"createTime,omitempty"` + // CreatorRole: The database role which created this session. + CreatorRole string `json:"creatorRole,omitempty"` + // Labels: The labels for the session. * Label keys must be between 1 // and 63 characters long and must conform to the following regular // expression: `a-z ([-a-z0-9]*[a-z0-9])?`. * Label values must be @@ -4823,191 +4905,56 @@ func (s *Transaction) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// TransactionOptions: Transactions: Each session can have at most one -// active transaction at a time (note that standalone reads and queries -// use a transaction internally and do count towards the one transaction -// limit). After the active transaction is completed, the session can -// immediately be re-used for the next transaction. It is not necessary -// to create a new session for each transaction. Transaction modes: -// Cloud Spanner supports three transaction modes: 1. Locking -// read-write. This type of transaction is the only way to write data -// into Cloud Spanner. These transactions rely on pessimistic locking -// and, if necessary, two-phase commit. Locking read-write transactions -// may abort, requiring the application to retry. 2. Snapshot read-only. -// This transaction type provides guaranteed consistency across several -// reads, but does not allow writes. Snapshot read-only transactions can -// be configured to read at timestamps in the past. Snapshot read-only -// transactions do not need to be committed. 3. Partitioned DML. This -// type of transaction is used to execute a single Partitioned DML -// statement. Partitioned DML partitions the key space and runs the DML -// statement over each partition in parallel using separate, internal -// transactions that commit independently. Partitioned DML transactions -// do not need to be committed. For transactions that only read, -// snapshot read-only transactions provide simpler semantics and are -// almost always faster. In particular, read-only transactions do not -// take locks, so they do not conflict with read-write transactions. As -// a consequence of not taking locks, they also do not abort, so retry -// loops are not needed. Transactions may only read-write data in a -// single database. They may, however, read-write data in different -// tables within that database. Locking read-write transactions: Locking -// transactions may be used to atomically read-modify-write data -// anywhere in a database. This type of transaction is externally -// consistent. Clients should attempt to minimize the amount of time a -// transaction is active. Faster transactions commit with higher -// probability and cause less contention. Cloud Spanner attempts to keep -// read locks active as long as the transaction continues to do reads, -// and the transaction has not been terminated by Commit or Rollback. -// Long periods of inactivity at the client may cause Cloud Spanner to -// release a transaction's locks and abort it. Conceptually, a -// read-write transaction consists of zero or more reads or SQL -// statements followed by Commit. At any time before Commit, the client -// can send a Rollback request to abort the transaction. Semantics: -// Cloud Spanner can commit the transaction if all read locks it -// acquired are still valid at commit time, and it is able to acquire -// write locks for all writes. Cloud Spanner can abort the transaction -// for any reason. If a commit attempt returns `ABORTED`, Cloud Spanner -// guarantees that the transaction has not modified any user data in -// Cloud Spanner. Unless the transaction commits, Cloud Spanner makes no -// guarantees about how long the transaction's locks were held for. It -// is an error to use Cloud Spanner locks for any sort of mutual -// exclusion other than between Cloud Spanner transactions themselves. -// Retrying aborted transactions: When a transaction aborts, the -// application can choose to retry the whole transaction again. To -// maximize the chances of successfully committing the retry, the client -// should execute the retry in the same session as the original attempt. -// The original session's lock priority increases with each consecutive -// abort, meaning that each attempt has a slightly better chance of -// success than the previous. Under some circumstances (for example, -// many transactions attempting to modify the same row(s)), a -// transaction can abort many times in a short period before -// successfully committing. Thus, it is not a good idea to cap the -// number of retries a transaction can attempt; instead, it is better to -// limit the total amount of time spent retrying. Idle transactions: A -// transaction is considered idle if it has no outstanding reads or SQL -// queries and has not started a read or SQL query within the last 10 -// seconds. Idle transactions can be aborted by Cloud Spanner so that -// they don't hold on to locks indefinitely. If an idle transaction is -// aborted, the commit will fail with error `ABORTED`. If this behavior -// is undesirable, periodically executing a simple SQL query in the -// transaction (for example, `SELECT 1`) prevents the transaction from -// becoming idle. Snapshot read-only transactions: Snapshot read-only -// transactions provides a simpler method than locking read-write -// transactions for doing several consistent reads. However, this type -// of transaction does not support writes. Snapshot transactions do not -// take locks. Instead, they work by choosing a Cloud Spanner timestamp, -// then executing all reads at that timestamp. Since they do not acquire -// locks, they do not block concurrent read-write transactions. Unlike -// locking read-write transactions, snapshot read-only transactions -// never abort. They can fail if the chosen read timestamp is garbage -// collected; however, the default garbage collection policy is generous -// enough that most applications do not need to worry about this in -// practice. Snapshot read-only transactions do not need to call Commit -// or Rollback (and in fact are not permitted to do so). To execute a -// snapshot transaction, the client specifies a timestamp bound, which -// tells Cloud Spanner how to choose a read timestamp. The types of -// timestamp bound are: - Strong (the default). - Bounded staleness. - -// Exact staleness. If the Cloud Spanner database to be read is -// geographically distributed, stale read-only transactions can execute -// more quickly than strong or read-write transactions, because they are -// able to execute far from the leader replica. Each type of timestamp -// bound is discussed in detail below. Strong: Strong reads are -// guaranteed to see the effects of all transactions that have committed -// before the start of the read. Furthermore, all rows yielded by a -// single read are consistent with each other -- if any part of the read -// observes a transaction, all parts of the read see the transaction. -// Strong reads are not repeatable: two consecutive strong read-only -// transactions might return inconsistent results if there are -// concurrent writes. If consistency across reads is required, the reads -// should be executed within a transaction or at an exact read -// timestamp. See TransactionOptions.ReadOnly.strong. Exact staleness: -// These timestamp bounds execute reads at a user-specified timestamp. -// Reads at a timestamp are guaranteed to see a consistent prefix of the -// global transaction history: they observe modifications done by all -// transactions with a commit timestamp less than or equal to the read -// timestamp, and observe none of the modifications done by transactions -// with a larger commit timestamp. They will block until all conflicting -// transactions that may be assigned commit timestamps <= the read -// timestamp have finished. The timestamp can either be expressed as an -// absolute Cloud Spanner commit timestamp or a staleness relative to -// the current time. These modes do not require a "negotiation phase" to -// pick a timestamp. As a result, they execute slightly faster than the -// equivalent boundedly stale concurrency modes. On the other hand, -// boundedly stale reads usually return fresher results. See -// TransactionOptions.ReadOnly.read_timestamp and -// TransactionOptions.ReadOnly.exact_staleness. Bounded staleness: -// Bounded staleness modes allow Cloud Spanner to pick the read -// timestamp, subject to a user-provided staleness bound. Cloud Spanner -// chooses the newest timestamp within the staleness bound that allows -// execution of the reads at the closest available replica without -// blocking. All rows yielded are consistent with each other -- if any -// part of the read observes a transaction, all parts of the read see -// the transaction. Boundedly stale reads are not repeatable: two stale -// reads, even if they use the same staleness bound, can execute at -// different timestamps and thus return inconsistent results. Boundedly -// stale reads execute in two phases: the first phase negotiates a -// timestamp among all replicas needed to serve the read. In the second -// phase, reads are executed at the negotiated timestamp. As a result of -// the two phase execution, bounded staleness reads are usually a little -// slower than comparable exact staleness reads. However, they are -// typically able to return fresher results, and are more likely to -// execute at the closest replica. Because the timestamp negotiation -// requires up-front knowledge of which rows will be read, it can only -// be used with single-use read-only transactions. See -// TransactionOptions.ReadOnly.max_staleness and -// TransactionOptions.ReadOnly.min_read_timestamp. Old read timestamps -// and garbage collection: Cloud Spanner continuously garbage collects -// deleted and overwritten data in the background to reclaim storage -// space. This process is known as "version GC". By default, version GC -// reclaims versions after they are one hour old. Because of this, Cloud -// Spanner cannot perform reads at read timestamps more than one hour in -// the past. This restriction also applies to in-progress reads and/or -// SQL queries whose timestamp become too old while executing. Reads and -// SQL queries with too-old read timestamps fail with the error -// `FAILED_PRECONDITION`. You can configure and extend the -// `VERSION_RETENTION_PERIOD` of a database up to a period as long as -// one week, which allows Cloud Spanner to perform reads up to one week -// in the past. Partitioned DML transactions: Partitioned DML -// transactions are used to execute DML statements with a different -// execution strategy that provides different, and often better, -// scalability properties for large, table-wide operations than DML in a -// ReadWrite transaction. Smaller scoped statements, such as an OLTP -// workload, should prefer using ReadWrite transactions. Partitioned DML -// partitions the keyspace and runs the DML statement on each partition -// in separate, internal transactions. These transactions commit -// automatically when complete, and run independently from one another. -// To reduce lock contention, this execution strategy only acquires read -// locks on rows that match the WHERE clause of the statement. -// Additionally, the smaller per-partition transactions hold locks for -// less time. That said, Partitioned DML is not a drop-in replacement -// for standard DML used in ReadWrite transactions. - The DML statement -// must be fully-partitionable. Specifically, the statement must be -// expressible as the union of many statements which each access only a -// single row of the table. - The statement is not applied atomically to -// all rows of the table. Rather, the statement is applied atomically to -// partitions of the table, in independent transactions. Secondary index -// rows are updated atomically with the base table rows. - Partitioned -// DML does not guarantee exactly-once execution semantics against a -// partition. The statement will be applied at least once to each -// partition. It is strongly recommended that the DML statement should -// be idempotent to avoid unexpected results. For instance, it is -// potentially dangerous to run a statement such as `UPDATE table SET -// column = column + 1` as it could be run multiple times against some -// rows. - The partitions are committed automatically - there is no -// support for Commit or Rollback. If the call returns an error, or if -// the client issuing the ExecuteSql call dies, it is possible that some -// rows had the statement executed on them successfully. It is also -// possible that statement was never executed against other rows. - -// Partitioned DML transactions may only contain the execution of a -// single DML statement via ExecuteSql or ExecuteStreamingSql. - If any -// error is encountered during the execution of the partitioned DML -// operation (for instance, a UNIQUE INDEX violation, division by zero, -// or a value that cannot be stored due to schema constraints), then the -// operation is stopped at that point and an error is returned. It is -// possible that at this point, some partitions have been committed (or -// even committed multiple times), and other partitions have not been -// run at all. Given the above, Partitioned DML is good fit for large, -// database-wide, operations that are idempotent, such as deleting old -// rows from a very large table. +// TransactionOptions: In addition, if +// TransactionOptions.read_only.return_read_timestamp is set to true, a +// special value of 2^63 - 2 will be returned in the Transaction message +// that describes the transaction, instead of a valid read timestamp. +// This special value should be discarded and not used for any +// subsequent queries. Please see +// https://cloud.google.com/spanner/docs/change-streams for more details +// on how to query the change stream TVFs. Partitioned DML transactions: +// Partitioned DML transactions are used to execute DML statements with +// a different execution strategy that provides different, and often +// better, scalability properties for large, table-wide operations than +// DML in a ReadWrite transaction. Smaller scoped statements, such as an +// OLTP workload, should prefer using ReadWrite transactions. +// Partitioned DML partitions the keyspace and runs the DML statement on +// each partition in separate, internal transactions. These transactions +// commit automatically when complete, and run independently from one +// another. To reduce lock contention, this execution strategy only +// acquires read locks on rows that match the WHERE clause of the +// statement. Additionally, the smaller per-partition transactions hold +// locks for less time. That said, Partitioned DML is not a drop-in +// replacement for standard DML used in ReadWrite transactions. - The +// DML statement must be fully-partitionable. Specifically, the +// statement must be expressible as the union of many statements which +// each access only a single row of the table. - The statement is not +// applied atomically to all rows of the table. Rather, the statement is +// applied atomically to partitions of the table, in independent +// transactions. Secondary index rows are updated atomically with the +// base table rows. - Partitioned DML does not guarantee exactly-once +// execution semantics against a partition. The statement will be +// applied at least once to each partition. It is strongly recommended +// that the DML statement should be idempotent to avoid unexpected +// results. For instance, it is potentially dangerous to run a statement +// such as `UPDATE table SET column = column + 1` as it could be run +// multiple times against some rows. - The partitions are committed +// automatically - there is no support for Commit or Rollback. If the +// call returns an error, or if the client issuing the ExecuteSql call +// dies, it is possible that some rows had the statement executed on +// them successfully. It is also possible that statement was never +// executed against other rows. - Partitioned DML transactions may only +// contain the execution of a single DML statement via ExecuteSql or +// ExecuteStreamingSql. - If any error is encountered during the +// execution of the partitioned DML operation (for instance, a UNIQUE +// INDEX violation, division by zero, or a value that cannot be stored +// due to schema constraints), then the operation is stopped at that +// point and an error is returned. It is possible that at this point, +// some partitions have been committed (or even committed multiple +// times), and other partitions have not been run at all. Given the +// above, Partitioned DML is good fit for large, database-wide, +// operations that are idempotent, such as deleting old rows from a very +// large table. type TransactionOptions struct { // PartitionedDml: Partitioned DML transaction. Authorization to begin a // Partitioned DML transaction requires @@ -12174,6 +12121,202 @@ func (c *ProjectsInstancesDatabasesUpdateDdlCall) Do(opts ...googleapi.CallOptio } +// method id "spanner.projects.instances.databases.databaseRoles.list": + +type ProjectsInstancesDatabasesDatabaseRolesListCall struct { + s *Service + parent string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// List: Lists Cloud Spanner database roles. +// +// - parent: The database whose roles should be listed. Values are of +// the form `projects//instances//databases//databaseRoles`. +func (r *ProjectsInstancesDatabasesDatabaseRolesService) List(parent string) *ProjectsInstancesDatabasesDatabaseRolesListCall { + c := &ProjectsInstancesDatabasesDatabaseRolesListCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + return c +} + +// PageSize sets the optional parameter "pageSize": Number of database +// roles to be returned in the response. If 0 or less, defaults to the +// server's maximum allowed page size. +func (c *ProjectsInstancesDatabasesDatabaseRolesListCall) PageSize(pageSize int64) *ProjectsInstancesDatabasesDatabaseRolesListCall { + c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) + return c +} + +// PageToken sets the optional parameter "pageToken": If non-empty, +// `page_token` should contain a next_page_token from a previous +// ListDatabaseRolesResponse. +func (c *ProjectsInstancesDatabasesDatabaseRolesListCall) PageToken(pageToken string) *ProjectsInstancesDatabasesDatabaseRolesListCall { + 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 *ProjectsInstancesDatabasesDatabaseRolesListCall) Fields(s ...googleapi.Field) *ProjectsInstancesDatabasesDatabaseRolesListCall { + 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 *ProjectsInstancesDatabasesDatabaseRolesListCall) IfNoneMatch(entityTag string) *ProjectsInstancesDatabasesDatabaseRolesListCall { + 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 *ProjectsInstancesDatabasesDatabaseRolesListCall) Context(ctx context.Context) *ProjectsInstancesDatabasesDatabaseRolesListCall { + 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 *ProjectsInstancesDatabasesDatabaseRolesListCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsInstancesDatabasesDatabaseRolesListCall) 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}/databaseRoles") + 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 "spanner.projects.instances.databases.databaseRoles.list" call. +// Exactly one of *ListDatabaseRolesResponse or error will be non-nil. +// Any non-2xx status code is an error. Response headers are in either +// *ListDatabaseRolesResponse.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 *ProjectsInstancesDatabasesDatabaseRolesListCall) Do(opts ...googleapi.CallOption) (*ListDatabaseRolesResponse, 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, &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, err + } + ret := &ListDatabaseRolesResponse{ + 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 Cloud Spanner database roles.", + // "flatPath": "v1/projects/{projectsId}/instances/{instancesId}/databases/{databasesId}/databaseRoles", + // "httpMethod": "GET", + // "id": "spanner.projects.instances.databases.databaseRoles.list", + // "parameterOrder": [ + // "parent" + // ], + // "parameters": { + // "pageSize": { + // "description": "Number of database roles to be returned in the response. If 0 or less, defaults to the server's maximum allowed page size.", + // "format": "int32", + // "location": "query", + // "type": "integer" + // }, + // "pageToken": { + // "description": "If non-empty, `page_token` should contain a next_page_token from a previous ListDatabaseRolesResponse.", + // "location": "query", + // "type": "string" + // }, + // "parent": { + // "description": "Required. The database whose roles should be listed. Values are of the form `projects//instances//databases//databaseRoles`.", + // "location": "path", + // "pattern": "^projects/[^/]+/instances/[^/]+/databases/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1/{+parent}/databaseRoles", + // "response": { + // "$ref": "ListDatabaseRolesResponse" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform", + // "https://www.googleapis.com/auth/spanner.admin" + // ] + // } + +} + +// 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 *ProjectsInstancesDatabasesDatabaseRolesListCall) Pages(ctx context.Context, f func(*ListDatabaseRolesResponse) 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 "spanner.projects.instances.databases.operations.cancel": type ProjectsInstancesDatabasesOperationsCancelCall struct { diff --git a/sqladmin/v1/sqladmin-api.json b/sqladmin/v1/sqladmin-api.json index 991a81c2f50..6a7195c34c3 100644 --- a/sqladmin/v1/sqladmin-api.json +++ b/sqladmin/v1/sqladmin-api.json @@ -920,7 +920,7 @@ "type": "string" }, "maxResults": { - "description": "The maximum number of results to return per response.", + "description": "The maximum number of instances to return. The service may return fewer than this value. The maximum value is 1000; values above 1000 are coerced to 1000.", "format": "uint32", "location": "query", "type": "integer" @@ -1877,7 +1877,7 @@ } } }, - "revision": "20220513", + "revision": "20220602", "rootUrl": "https://sqladmin.googleapis.com/", "schemas": { "AclEntry": { @@ -1912,11 +1912,13 @@ "description": "Code to uniquely identify the warning type.", "enum": [ "SQL_API_WARNING_CODE_UNSPECIFIED", - "REGION_UNREACHABLE" + "REGION_UNREACHABLE", + "MAX_RESULTS_EXCEEDS_LIMIT" ], "enumDescriptions": [ "An unknown or unset warning type from Cloud SQL API.", - "Warning when one or more regions are not reachable. The returned result set may be incomplete." + "Warning when one or more regions are not reachable. The returned result set may be incomplete.", + "Warning when user provided maxResults parameter exceeds the limit. The returned result set may be incomplete." ], "type": "string" }, @@ -4208,7 +4210,8 @@ "PRIMARY_ALREADY_SETUP", "UNSUPPORTED_BINLOG_FORMAT", "BINLOG_RETENTION_SETTING", - "UNSUPPORTED_STORAGE_ENGINE" + "UNSUPPORTED_STORAGE_ENGINE", + "LIMITED_SUPPORT_TABLES" ], "enumDescriptions": [ "", @@ -4237,7 +4240,8 @@ "The primary instance has been setup and will fail the setup.", "The primary instance has unsupported binary log format.", "The primary instance's binary log retention setting.", - "The primary instance has tables with unsupported storage engine." + "The primary instance has tables with unsupported storage engine.", + "Source has tables with limited support eg: PostgreSQL tables without primary keys" ], "type": "string" } diff --git a/sqladmin/v1/sqladmin-gen.go b/sqladmin/v1/sqladmin-gen.go index 6dceda97427..ce805a3ba1b 100644 --- a/sqladmin/v1/sqladmin-gen.go +++ b/sqladmin/v1/sqladmin-gen.go @@ -323,6 +323,9 @@ type ApiWarning struct { // type from Cloud SQL API. // "REGION_UNREACHABLE" - Warning when one or more regions are not // reachable. The returned result set may be incomplete. + // "MAX_RESULTS_EXCEEDS_LIMIT" - Warning when user provided maxResults + // parameter exceeds the limit. The returned result set may be + // incomplete. Code string `json:"code,omitempty"` // Message: The warning message. @@ -3679,6 +3682,8 @@ type SqlExternalSyncSettingError struct { // retention setting. // "UNSUPPORTED_STORAGE_ENGINE" - The primary instance has tables with // unsupported storage engine. + // "LIMITED_SUPPORT_TABLES" - Source has tables with limited support + // eg: PostgreSQL tables without primary keys Type string `json:"type,omitempty"` // ForceSendFields is a list of field names (e.g. "Detail") to @@ -8120,7 +8125,9 @@ func (c *InstancesListCall) Filter(filter string) *InstancesListCall { } // MaxResults sets the optional parameter "maxResults": The maximum -// number of results to return per response. +// number of instances to return. The service may return fewer than this +// value. The maximum value is 1000; values above 1000 are coerced to +// 1000. func (c *InstancesListCall) MaxResults(maxResults int64) *InstancesListCall { c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) return c @@ -8247,7 +8254,7 @@ func (c *InstancesListCall) Do(opts ...googleapi.CallOption) (*InstancesListResp // "type": "string" // }, // "maxResults": { - // "description": "The maximum number of results to return per response.", + // "description": "The maximum number of instances to return. The service may return fewer than this value. The maximum value is 1000; values above 1000 are coerced to 1000.", // "format": "uint32", // "location": "query", // "type": "integer" diff --git a/sqladmin/v1beta4/sqladmin-api.json b/sqladmin/v1beta4/sqladmin-api.json index 82ca281514e..17ad3e36270 100644 --- a/sqladmin/v1beta4/sqladmin-api.json +++ b/sqladmin/v1beta4/sqladmin-api.json @@ -920,7 +920,7 @@ "type": "string" }, "maxResults": { - "description": "The maximum number of results to return per response.", + "description": "The maximum number of instances to return. The service may return fewer than this value. The maximum value is 1000; values above 1000 are coerced to 1000.", "format": "uint32", "location": "query", "type": "integer" @@ -1877,7 +1877,7 @@ } } }, - "revision": "20220513", + "revision": "20220602", "rootUrl": "https://sqladmin.googleapis.com/", "schemas": { "AclEntry": { @@ -1912,11 +1912,13 @@ "description": "Code to uniquely identify the warning type.", "enum": [ "SQL_API_WARNING_CODE_UNSPECIFIED", - "REGION_UNREACHABLE" + "REGION_UNREACHABLE", + "MAX_RESULTS_EXCEEDS_LIMIT" ], "enumDescriptions": [ "An unknown or unset warning type from Cloud SQL API.", - "Warning when one or more regions are not reachable. The returned result set may be incomplete." + "Warning when one or more regions are not reachable. The returned result set may be incomplete.", + "Warning when user provided maxResults parameter exceeds the limit. The returned result set may be incomplete." ], "type": "string" }, @@ -4208,7 +4210,8 @@ "PRIMARY_ALREADY_SETUP", "UNSUPPORTED_BINLOG_FORMAT", "BINLOG_RETENTION_SETTING", - "UNSUPPORTED_STORAGE_ENGINE" + "UNSUPPORTED_STORAGE_ENGINE", + "LIMITED_SUPPORT_TABLES" ], "enumDescriptions": [ "", @@ -4237,7 +4240,8 @@ "The primary instance has been setup and will fail the setup.", "The primary instance has unsupported binary log format.", "The primary instance's binary log retention setting.", - "The primary instance has tables with unsupported storage engine." + "The primary instance has tables with unsupported storage engine.", + "Source has tables with limited support eg: PostgreSQL tables without primary keys" ], "type": "string" } diff --git a/sqladmin/v1beta4/sqladmin-gen.go b/sqladmin/v1beta4/sqladmin-gen.go index e74581a717c..ea271c5ccf2 100644 --- a/sqladmin/v1beta4/sqladmin-gen.go +++ b/sqladmin/v1beta4/sqladmin-gen.go @@ -323,6 +323,9 @@ type ApiWarning struct { // type from Cloud SQL API. // "REGION_UNREACHABLE" - Warning when one or more regions are not // reachable. The returned result set may be incomplete. + // "MAX_RESULTS_EXCEEDS_LIMIT" - Warning when user provided maxResults + // parameter exceeds the limit. The returned result set may be + // incomplete. Code string `json:"code,omitempty"` // Message: The warning message. @@ -3679,6 +3682,8 @@ type SqlExternalSyncSettingError struct { // retention setting. // "UNSUPPORTED_STORAGE_ENGINE" - The primary instance has tables with // unsupported storage engine. + // "LIMITED_SUPPORT_TABLES" - Source has tables with limited support + // eg: PostgreSQL tables without primary keys Type string `json:"type,omitempty"` // ForceSendFields is a list of field names (e.g. "Detail") to @@ -8116,7 +8121,9 @@ func (c *InstancesListCall) Filter(filter string) *InstancesListCall { } // MaxResults sets the optional parameter "maxResults": The maximum -// number of results to return per response. +// number of instances to return. The service may return fewer than this +// value. The maximum value is 1000; values above 1000 are coerced to +// 1000. func (c *InstancesListCall) MaxResults(maxResults int64) *InstancesListCall { c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) return c @@ -8243,7 +8250,7 @@ func (c *InstancesListCall) Do(opts ...googleapi.CallOption) (*InstancesListResp // "type": "string" // }, // "maxResults": { - // "description": "The maximum number of results to return per response.", + // "description": "The maximum number of instances to return. The service may return fewer than this value. The maximum value is 1000; values above 1000 are coerced to 1000.", // "format": "uint32", // "location": "query", // "type": "integer"