diff --git a/alloydb/v1/alloydb-api.json b/alloydb/v1/alloydb-api.json new file mode 100644 index 00000000000..7f7069a67aa --- /dev/null +++ b/alloydb/v1/alloydb-api.json @@ -0,0 +1,3405 @@ +{ + "auth": { + "oauth2": { + "scopes": { + "https://www.googleapis.com/auth/cloud-platform": { + "description": "See, edit, configure, and delete your Google Cloud data and see the email address for your Google Account." + } + } + } + }, + "basePath": "", + "baseUrl": "https://alloydb.googleapis.com/", + "batchPath": "batch", + "canonicalName": "Cloud AlloyDB Admin", + "description": "AlloyDB for PostgreSQL is an open source-compatible database service that provides a powerful option for migrating, modernizing, or building commercial-grade applications. It offers full compatibility with standard PostgreSQL, and is more than 4x faster for transactional workloads and up to 100x faster for analytical queries than standard PostgreSQL in our performance tests. AlloyDB for PostgreSQL offers a 99.99 percent availability SLA inclusive of maintenance. AlloyDB is optimized for the most demanding use cases, allowing you to build new applications that require high transaction throughput, large database sizes, or multiple read resources; scale existing PostgreSQL workloads with no application changes; and modernize legacy proprietary databases. ", + "discoveryVersion": "v1", + "documentationLink": "https://cloud.google.com/alloydb/", + "fullyEncodeReservedExpansion": true, + "icons": { + "x16": "http://www.google.com/images/icons/product/search-16.gif", + "x32": "http://www.google.com/images/icons/product/search-32.gif" + }, + "id": "alloydb:v1", + "kind": "discovery#restDescription", + "mtlsRootUrl": "https://alloydb.mtls.googleapis.com/", + "name": "alloydb", + "ownerDomain": "google.com", + "ownerName": "Google", + "parameters": { + "$.xgafv": { + "description": "V1 error format.", + "enum": [ + "1", + "2" + ], + "enumDescriptions": [ + "v1 error format", + "v2 error format" + ], + "location": "query", + "type": "string" + }, + "access_token": { + "description": "OAuth access token.", + "location": "query", + "type": "string" + }, + "alt": { + "default": "json", + "description": "Data format for response.", + "enum": [ + "json", + "media", + "proto" + ], + "enumDescriptions": [ + "Responses with Content-Type of application/json", + "Media download with context-dependent Content-Type", + "Responses with Content-Type of application/x-protobuf" + ], + "location": "query", + "type": "string" + }, + "callback": { + "description": "JSONP", + "location": "query", + "type": "string" + }, + "fields": { + "description": "Selector specifying which fields to include in a partial response.", + "location": "query", + "type": "string" + }, + "key": { + "description": "API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token.", + "location": "query", + "type": "string" + }, + "oauth_token": { + "description": "OAuth 2.0 token for the current user.", + "location": "query", + "type": "string" + }, + "prettyPrint": { + "default": "true", + "description": "Returns response with indentations and line breaks.", + "location": "query", + "type": "boolean" + }, + "quotaUser": { + "description": "Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters.", + "location": "query", + "type": "string" + }, + "uploadType": { + "description": "Legacy upload protocol for media (e.g. \"media\", \"multipart\").", + "location": "query", + "type": "string" + }, + "upload_protocol": { + "description": "Upload protocol for media (e.g. \"raw\", \"multipart\").", + "location": "query", + "type": "string" + } + }, + "protocol": "rest", + "resources": { + "projects": { + "resources": { + "locations": { + "methods": { + "get": { + "description": "Gets information about a location.", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}", + "httpMethod": "GET", + "id": "alloydb.projects.locations.get", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Resource name for the location.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1/{+name}", + "response": { + "$ref": "GoogleCloudLocationLocation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "list": { + "description": "Lists information about the supported locations for this service.", + "flatPath": "v1/projects/{projectsId}/locations", + "httpMethod": "GET", + "id": "alloydb.projects.locations.list", + "parameterOrder": [ + "name" + ], + "parameters": { + "filter": { + "description": "A filter to narrow down results to a preferred subset. The filtering language accepts strings like `\"displayName=tokyo\"`, and is documented in more detail in [AIP-160](https://google.aip.dev/160).", + "location": "query", + "type": "string" + }, + "name": { + "description": "The resource that owns the locations collection, if applicable.", + "location": "path", + "pattern": "^projects/[^/]+$", + "required": true, + "type": "string" + }, + "pageSize": { + "description": "The maximum number of results to return. If not set, the service selects a default.", + "format": "int32", + "location": "query", + "type": "integer" + }, + "pageToken": { + "description": "A page token received from the `next_page_token` field in the response. Send that page token to receive the subsequent page.", + "location": "query", + "type": "string" + } + }, + "path": "v1/{+name}/locations", + "response": { + "$ref": "GoogleCloudLocationListLocationsResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + } + }, + "resources": { + "backups": { + "methods": { + "create": { + "description": "Creates a new Backup in a given project and location.", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/backups", + "httpMethod": "POST", + "id": "alloydb.projects.locations.backups.create", + "parameterOrder": [ + "parent" + ], + "parameters": { + "backupId": { + "description": "Required. ID of the requesting object.", + "location": "query", + "type": "string" + }, + "parent": { + "description": "Required. Value for parent.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+$", + "required": true, + "type": "string" + }, + "requestId": { + "description": "Optional. An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. The server will guarantee that for at least 60 minutes since the first request. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", + "location": "query", + "type": "string" + }, + "validateOnly": { + "description": "Optional. If set, the backend validates the request, but doesn't actually execute it.", + "location": "query", + "type": "boolean" + } + }, + "path": "v1/{+parent}/backups", + "request": { + "$ref": "Backup" + }, + "response": { + "$ref": "Operation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "delete": { + "description": "Deletes a single Backup.", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/backups/{backupsId}", + "httpMethod": "DELETE", + "id": "alloydb.projects.locations.backups.delete", + "parameterOrder": [ + "name" + ], + "parameters": { + "etag": { + "description": "Optional. The current etag of the Backup. If an etag is provided and does not match the current etag of the Backup, deletion will be blocked and an ABORTED error will be returned.", + "location": "query", + "type": "string" + }, + "name": { + "description": "Required. Name of the resource. For the required format, see the comment on the Backup.name field.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/backups/[^/]+$", + "required": true, + "type": "string" + }, + "requestId": { + "description": "Optional. An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. The server will guarantee that for at least 60 minutes after the first request. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", + "location": "query", + "type": "string" + }, + "validateOnly": { + "description": "Optional. If set, the backend validates the request, but doesn't actually execute it.", + "location": "query", + "type": "boolean" + } + }, + "path": "v1/{+name}", + "response": { + "$ref": "Operation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "get": { + "description": "Gets details of a single Backup.", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/backups/{backupsId}", + "httpMethod": "GET", + "id": "alloydb.projects.locations.backups.get", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Required. Name of the resource", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/backups/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1/{+name}", + "response": { + "$ref": "Backup" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "list": { + "description": "Lists Backups in a given project and location.", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/backups", + "httpMethod": "GET", + "id": "alloydb.projects.locations.backups.list", + "parameterOrder": [ + "parent" + ], + "parameters": { + "filter": { + "description": "Filtering results", + "location": "query", + "type": "string" + }, + "orderBy": { + "description": "Hint for how to order the results", + "location": "query", + "type": "string" + }, + "pageSize": { + "description": "Requested page size. Server may return fewer items than requested. If unspecified, server will pick an appropriate default.", + "format": "int32", + "location": "query", + "type": "integer" + }, + "pageToken": { + "description": "A token identifying a page of results the server should return.", + "location": "query", + "type": "string" + }, + "parent": { + "description": "Required. Parent value for ListBackupsRequest", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1/{+parent}/backups", + "response": { + "$ref": "ListBackupsResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "patch": { + "description": "Updates the parameters of a single Backup.", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/backups/{backupsId}", + "httpMethod": "PATCH", + "id": "alloydb.projects.locations.backups.patch", + "parameterOrder": [ + "name" + ], + "parameters": { + "allowMissing": { + "description": "Optional. If set to true, update succeeds even if instance is not found. In that case, a new backup is created and `update_mask` is ignored.", + "location": "query", + "type": "boolean" + }, + "name": { + "description": "Output only. The name of the backup resource with the format: * projects/{project}/locations/{region}/backups/{backup_id} where the cluster and backup ID segments should satisfy the regex expression `[a-z]([a-z0-9-]{0,61}[a-z0-9])?`, e.g. 1-63 characters of lowercase letters, numbers, and dashes, starting with a letter, and ending with a letter or number. For more details see https://google.aip.dev/122. The prefix of the backup resource name is the name of the parent resource: * projects/{project}/locations/{region}", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/backups/[^/]+$", + "required": true, + "type": "string" + }, + "requestId": { + "description": "Optional. An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. The server will guarantee that for at least 60 minutes since the first request. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", + "location": "query", + "type": "string" + }, + "updateMask": { + "description": "Optional. Field mask is used to specify the fields to be overwritten in the Backup resource by the update. The fields specified in the update_mask are relative to the resource, not the full request. A field will be overwritten if it is in the mask. If the user does not provide a mask then all fields will be overwritten.", + "format": "google-fieldmask", + "location": "query", + "type": "string" + }, + "validateOnly": { + "description": "Optional. If set, the backend validates the request, but doesn't actually execute it.", + "location": "query", + "type": "boolean" + } + }, + "path": "v1/{+name}", + "request": { + "$ref": "Backup" + }, + "response": { + "$ref": "Operation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + } + } + }, + "clusters": { + "methods": { + "create": { + "description": "Creates a new Cluster in a given project and location.", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/clusters", + "httpMethod": "POST", + "id": "alloydb.projects.locations.clusters.create", + "parameterOrder": [ + "parent" + ], + "parameters": { + "clusterId": { + "description": "Required. ID of the requesting object.", + "location": "query", + "type": "string" + }, + "parent": { + "description": "Required. The location of the new cluster. For the required format, see the comment on the Cluster.name field.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+$", + "required": true, + "type": "string" + }, + "requestId": { + "description": "Optional. An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. The server will guarantee that for at least 60 minutes since the first request. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", + "location": "query", + "type": "string" + }, + "validateOnly": { + "description": "Optional. If set, performs request validation (e.g. permission checks and any other type of validation), but do not actually execute the create request.", + "location": "query", + "type": "boolean" + } + }, + "path": "v1/{+parent}/clusters", + "request": { + "$ref": "Cluster" + }, + "response": { + "$ref": "Operation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "createsecondary": { + "description": "Creates a cluster of type SECONDARY in the given location using the primary cluster as the source.", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/clusters:createsecondary", + "httpMethod": "POST", + "id": "alloydb.projects.locations.clusters.createsecondary", + "parameterOrder": [ + "parent" + ], + "parameters": { + "clusterId": { + "description": "Required. ID of the requesting object (the secondary cluster).", + "location": "query", + "type": "string" + }, + "parent": { + "description": "Required. The location of the new cluster. For the required format, see the comment on the Cluster.name field.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+$", + "required": true, + "type": "string" + }, + "requestId": { + "description": "Optional. An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. The server will guarantee that for at least 60 minutes since the first request. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", + "location": "query", + "type": "string" + }, + "validateOnly": { + "description": "Optional. If set, performs request validation (e.g. permission checks and any other type of validation), but do not actually execute the create request.", + "location": "query", + "type": "boolean" + } + }, + "path": "v1/{+parent}/clusters:createsecondary", + "request": { + "$ref": "Cluster" + }, + "response": { + "$ref": "Operation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "delete": { + "description": "Deletes a single Cluster.", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/clusters/{clustersId}", + "httpMethod": "DELETE", + "id": "alloydb.projects.locations.clusters.delete", + "parameterOrder": [ + "name" + ], + "parameters": { + "etag": { + "description": "Optional. The current etag of the Cluster. If an etag is provided and does not match the current etag of the Cluster, deletion will be blocked and an ABORTED error will be returned.", + "location": "query", + "type": "string" + }, + "force": { + "description": "Optional. Whether to cascade delete child instances for given cluster.", + "location": "query", + "type": "boolean" + }, + "name": { + "description": "Required. The name of the resource. For the required format, see the comment on the Cluster.name field.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/clusters/[^/]+$", + "required": true, + "type": "string" + }, + "requestId": { + "description": "Optional. An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. The server will guarantee that for at least 60 minutes after the first request. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", + "location": "query", + "type": "string" + }, + "validateOnly": { + "description": "Optional. If set, performs request validation (e.g. permission checks and any other type of validation), but do not actually execute the delete.", + "location": "query", + "type": "boolean" + } + }, + "path": "v1/{+name}", + "response": { + "$ref": "Operation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "get": { + "description": "Gets details of a single Cluster.", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/clusters/{clustersId}", + "httpMethod": "GET", + "id": "alloydb.projects.locations.clusters.get", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Required. The name of the resource. For the required format, see the comment on the Cluster.name field.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/clusters/[^/]+$", + "required": true, + "type": "string" + }, + "view": { + "description": "Optional. The view of the cluster to return. Returns all default fields if not set.", + "enum": [ + "CLUSTER_VIEW_UNSPECIFIED", + "CLUSTER_VIEW_BASIC", + "CLUSTER_VIEW_CONTINUOUS_BACKUP" + ], + "enumDescriptions": [ + "CLUSTER_VIEW_UNSPECIFIED Not specified, equivalent to BASIC.", + "BASIC server responses include all the relevant cluster details, excluding Cluster.ContinuousBackupInfo.EarliestRestorableTime and other view-specific fields. The default value.", + "CONTINUOUS_BACKUP response returns all the fields from BASIC plus the earliest restorable time if continuous backups are enabled. May increase latency." + ], + "location": "query", + "type": "string" + } + }, + "path": "v1/{+name}", + "response": { + "$ref": "Cluster" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "list": { + "description": "Lists Clusters in a given project and location.", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/clusters", + "httpMethod": "GET", + "id": "alloydb.projects.locations.clusters.list", + "parameterOrder": [ + "parent" + ], + "parameters": { + "filter": { + "description": "Optional. Filtering results", + "location": "query", + "type": "string" + }, + "orderBy": { + "description": "Optional. Hint for how to order the results", + "location": "query", + "type": "string" + }, + "pageSize": { + "description": "Optional. Requested page size. Server may return fewer items than requested. If unspecified, server will pick an appropriate default.", + "format": "int32", + "location": "query", + "type": "integer" + }, + "pageToken": { + "description": "A token identifying a page of results the server should return.", + "location": "query", + "type": "string" + }, + "parent": { + "description": "Required. The name of the parent resource. For the required format, see the comment on the Cluster.name field. Additionally, you can perform an aggregated list operation by specifying a value with the following format: * projects/{project}/locations/-", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1/{+parent}/clusters", + "response": { + "$ref": "ListClustersResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "patch": { + "description": "Updates the parameters of a single Cluster.", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/clusters/{clustersId}", + "httpMethod": "PATCH", + "id": "alloydb.projects.locations.clusters.patch", + "parameterOrder": [ + "name" + ], + "parameters": { + "allowMissing": { + "description": "Optional. If set to true, update succeeds even if cluster is not found. In that case, a new cluster is created and `update_mask` is ignored.", + "location": "query", + "type": "boolean" + }, + "name": { + "description": "Output only. The name of the cluster resource with the format: * projects/{project}/locations/{region}/clusters/{cluster_id} where the cluster ID segment should satisfy the regex expression `[a-z0-9-]+`. For more details see https://google.aip.dev/122. The prefix of the cluster resource name is the name of the parent resource: * projects/{project}/locations/{region}", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/clusters/[^/]+$", + "required": true, + "type": "string" + }, + "requestId": { + "description": "Optional. An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. The server will guarantee that for at least 60 minutes since the first request. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", + "location": "query", + "type": "string" + }, + "updateMask": { + "description": "Optional. Field mask is used to specify the fields to be overwritten in the Cluster resource by the update. The fields specified in the update_mask are relative to the resource, not the full request. A field will be overwritten if it is in the mask. If the user does not provide a mask then all fields will be overwritten.", + "format": "google-fieldmask", + "location": "query", + "type": "string" + }, + "validateOnly": { + "description": "Optional. If set, performs request validation (e.g. permission checks and any other type of validation), but do not actually execute the update request.", + "location": "query", + "type": "boolean" + } + }, + "path": "v1/{+name}", + "request": { + "$ref": "Cluster" + }, + "response": { + "$ref": "Operation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "promote": { + "description": "Promotes a SECONDARY cluster. This turns down replication from the PRIMARY cluster and promotes a secondary cluster into its own standalone cluster. Imperative only.", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/clusters/{clustersId}:promote", + "httpMethod": "POST", + "id": "alloydb.projects.locations.clusters.promote", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Required. The name of the resource. For the required format, see the comment on the Cluster.name field", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/clusters/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1/{+name}:promote", + "request": { + "$ref": "PromoteClusterRequest" + }, + "response": { + "$ref": "Operation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "restore": { + "description": "Creates a new Cluster in a given project and location, with a volume restored from the provided source, either a backup ID or a point-in-time and a source cluster.", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/clusters:restore", + "httpMethod": "POST", + "id": "alloydb.projects.locations.clusters.restore", + "parameterOrder": [ + "parent" + ], + "parameters": { + "parent": { + "description": "Required. The name of the parent resource. For the required format, see the comment on the Cluster.name field.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1/{+parent}/clusters:restore", + "request": { + "$ref": "RestoreClusterRequest" + }, + "response": { + "$ref": "Operation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + } + }, + "resources": { + "instances": { + "methods": { + "create": { + "description": "Creates a new Instance in a given project and location.", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/clusters/{clustersId}/instances", + "httpMethod": "POST", + "id": "alloydb.projects.locations.clusters.instances.create", + "parameterOrder": [ + "parent" + ], + "parameters": { + "instanceId": { + "description": "Required. ID of the requesting object.", + "location": "query", + "type": "string" + }, + "parent": { + "description": "Required. The name of the parent resource. For the required format, see the comment on the Instance.name field.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/clusters/[^/]+$", + "required": true, + "type": "string" + }, + "requestId": { + "description": "Optional. An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. The server will guarantee that for at least 60 minutes since the first request. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", + "location": "query", + "type": "string" + }, + "validateOnly": { + "description": "Optional. If set, performs request validation (e.g. permission checks and any other type of validation), but do not actually execute the create request.", + "location": "query", + "type": "boolean" + } + }, + "path": "v1/{+parent}/instances", + "request": { + "$ref": "Instance" + }, + "response": { + "$ref": "Operation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "createsecondary": { + "description": "Creates a new SECONDARY Instance in a given project and location.", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/clusters/{clustersId}/instances:createsecondary", + "httpMethod": "POST", + "id": "alloydb.projects.locations.clusters.instances.createsecondary", + "parameterOrder": [ + "parent" + ], + "parameters": { + "instanceId": { + "description": "Required. ID of the requesting object.", + "location": "query", + "type": "string" + }, + "parent": { + "description": "Required. The name of the parent resource. For the required format, see the comment on the Instance.name field.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/clusters/[^/]+$", + "required": true, + "type": "string" + }, + "requestId": { + "description": "Optional. An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. The server will guarantee that for at least 60 minutes since the first request. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", + "location": "query", + "type": "string" + }, + "validateOnly": { + "description": "Optional. If set, performs request validation (e.g. permission checks and any other type of validation), but do not actually execute the create request.", + "location": "query", + "type": "boolean" + } + }, + "path": "v1/{+parent}/instances:createsecondary", + "request": { + "$ref": "Instance" + }, + "response": { + "$ref": "Operation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "delete": { + "description": "Deletes a single Instance.", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/clusters/{clustersId}/instances/{instancesId}", + "httpMethod": "DELETE", + "id": "alloydb.projects.locations.clusters.instances.delete", + "parameterOrder": [ + "name" + ], + "parameters": { + "etag": { + "description": "Optional. The current etag of the Instance. If an etag is provided and does not match the current etag of the Instance, deletion will be blocked and an ABORTED error will be returned.", + "location": "query", + "type": "string" + }, + "name": { + "description": "Required. The name of the resource. For the required format, see the comment on the Instance.name field.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/clusters/[^/]+/instances/[^/]+$", + "required": true, + "type": "string" + }, + "requestId": { + "description": "Optional. An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. The server will guarantee that for at least 60 minutes after the first request. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", + "location": "query", + "type": "string" + }, + "validateOnly": { + "description": "Optional. If set, performs request validation (e.g. permission checks and any other type of validation), but do not actually execute the delete.", + "location": "query", + "type": "boolean" + } + }, + "path": "v1/{+name}", + "response": { + "$ref": "Operation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "failover": { + "description": "Forces a Failover for a highly available instance. Failover promotes the HA standby instance as the new primary. Imperative only.", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/clusters/{clustersId}/instances/{instancesId}:failover", + "httpMethod": "POST", + "id": "alloydb.projects.locations.clusters.instances.failover", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Required. The name of the resource. For the required format, see the comment on the Instance.name field.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/clusters/[^/]+/instances/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1/{+name}:failover", + "request": { + "$ref": "FailoverInstanceRequest" + }, + "response": { + "$ref": "Operation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "get": { + "description": "Gets details of a single Instance.", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/clusters/{clustersId}/instances/{instancesId}", + "httpMethod": "GET", + "id": "alloydb.projects.locations.clusters.instances.get", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Required. The name of the resource. For the required format, see the comment on the Instance.name field.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/clusters/[^/]+/instances/[^/]+$", + "required": true, + "type": "string" + }, + "view": { + "description": "The view of the instance to return.", + "enum": [ + "INSTANCE_VIEW_UNSPECIFIED", + "INSTANCE_VIEW_BASIC", + "INSTANCE_VIEW_FULL" + ], + "enumDescriptions": [ + "INSTANCE_VIEW_UNSPECIFIED Not specified, equivalent to BASIC.", + "BASIC server responses for a primary or read instance include all the relevant instance details, excluding the details of each node in the instance. The default value.", + "FULL response is equivalent to BASIC for primary instance (for now). For read pool instance, this includes details of each node in the pool." + ], + "location": "query", + "type": "string" + } + }, + "path": "v1/{+name}", + "response": { + "$ref": "Instance" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "injectFault": { + "description": "Injects fault in an instance. Imperative only.", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/clusters/{clustersId}/instances/{instancesId}:injectFault", + "httpMethod": "POST", + "id": "alloydb.projects.locations.clusters.instances.injectFault", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Required. The name of the resource. For the required format, see the comment on the Instance.name field.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/clusters/[^/]+/instances/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1/{+name}:injectFault", + "request": { + "$ref": "InjectFaultRequest" + }, + "response": { + "$ref": "Operation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "list": { + "description": "Lists Instances in a given project and location.", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/clusters/{clustersId}/instances", + "httpMethod": "GET", + "id": "alloydb.projects.locations.clusters.instances.list", + "parameterOrder": [ + "parent" + ], + "parameters": { + "filter": { + "description": "Optional. Filtering results", + "location": "query", + "type": "string" + }, + "orderBy": { + "description": "Optional. Hint for how to order the results", + "location": "query", + "type": "string" + }, + "pageSize": { + "description": "Optional. Requested page size. Server may return fewer items than requested. If unspecified, server will pick an appropriate default.", + "format": "int32", + "location": "query", + "type": "integer" + }, + "pageToken": { + "description": "A token identifying a page of results the server should return.", + "location": "query", + "type": "string" + }, + "parent": { + "description": "Required. The name of the parent resource. For the required format, see the comment on the Instance.name field. Additionally, you can perform an aggregated list operation by specifying a value with one of the following formats: * projects/{project}/locations/-/clusters/- * projects/{project}/locations/{region}/clusters/-", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/clusters/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1/{+parent}/instances", + "response": { + "$ref": "ListInstancesResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "patch": { + "description": "Updates the parameters of a single Instance.", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/clusters/{clustersId}/instances/{instancesId}", + "httpMethod": "PATCH", + "id": "alloydb.projects.locations.clusters.instances.patch", + "parameterOrder": [ + "name" + ], + "parameters": { + "allowMissing": { + "description": "Optional. If set to true, update succeeds even if instance is not found. In that case, a new instance is created and `update_mask` is ignored.", + "location": "query", + "type": "boolean" + }, + "name": { + "description": "Output only. The name of the instance resource with the format: * projects/{project}/locations/{region}/clusters/{cluster_id}/instances/{instance_id} where the cluster and instance ID segments should satisfy the regex expression `[a-z]([a-z0-9-]{0,61}[a-z0-9])?`, e.g. 1-63 characters of lowercase letters, numbers, and dashes, starting with a letter, and ending with a letter or number. For more details see https://google.aip.dev/122. The prefix of the instance resource name is the name of the parent resource: * projects/{project}/locations/{region}/clusters/{cluster_id}", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/clusters/[^/]+/instances/[^/]+$", + "required": true, + "type": "string" + }, + "requestId": { + "description": "Optional. An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. The server will guarantee that for at least 60 minutes since the first request. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", + "location": "query", + "type": "string" + }, + "updateMask": { + "description": "Optional. Field mask is used to specify the fields to be overwritten in the Instance resource by the update. The fields specified in the update_mask are relative to the resource, not the full request. A field will be overwritten if it is in the mask. If the user does not provide a mask then all fields will be overwritten.", + "format": "google-fieldmask", + "location": "query", + "type": "string" + }, + "validateOnly": { + "description": "Optional. If set, performs request validation (e.g. permission checks and any other type of validation), but do not actually execute the update request.", + "location": "query", + "type": "boolean" + } + }, + "path": "v1/{+name}", + "request": { + "$ref": "Instance" + }, + "response": { + "$ref": "Operation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "restart": { + "description": "Restart an Instance in a cluster. Imperative only.", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/clusters/{clustersId}/instances/{instancesId}:restart", + "httpMethod": "POST", + "id": "alloydb.projects.locations.clusters.instances.restart", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Required. The name of the resource. For the required format, see the comment on the Instance.name field.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/clusters/[^/]+/instances/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1/{+name}:restart", + "request": { + "$ref": "RestartInstanceRequest" + }, + "response": { + "$ref": "Operation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + } + } + }, + "users": { + "methods": { + "create": { + "description": "Creates a new User in a given project, location, and cluster.", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/clusters/{clustersId}/users", + "httpMethod": "POST", + "id": "alloydb.projects.locations.clusters.users.create", + "parameterOrder": [ + "parent" + ], + "parameters": { + "parent": { + "description": "Required. Value for parent.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/clusters/[^/]+$", + "required": true, + "type": "string" + }, + "requestId": { + "description": "Optional. An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. The server will guarantee that for at least 60 minutes since the first request. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", + "location": "query", + "type": "string" + }, + "userId": { + "description": "Required. ID of the requesting object.", + "location": "query", + "type": "string" + }, + "validateOnly": { + "description": "Optional. If set, the backend validates the request, but doesn't actually execute it.", + "location": "query", + "type": "boolean" + } + }, + "path": "v1/{+parent}/users", + "request": { + "$ref": "User" + }, + "response": { + "$ref": "User" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "delete": { + "description": "Deletes a single User.", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/clusters/{clustersId}/users/{usersId}", + "httpMethod": "DELETE", + "id": "alloydb.projects.locations.clusters.users.delete", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Required. The name of the resource. For the required format, see the comment on the User.name field.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/clusters/[^/]+/users/[^/]+$", + "required": true, + "type": "string" + }, + "requestId": { + "description": "Optional. An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. The server will guarantee that for at least 60 minutes after the first request. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", + "location": "query", + "type": "string" + }, + "validateOnly": { + "description": "Optional. If set, the backend validates the request, but doesn't actually execute it.", + "location": "query", + "type": "boolean" + } + }, + "path": "v1/{+name}", + "response": { + "$ref": "Empty" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "get": { + "description": "Gets details of a single User.", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/clusters/{clustersId}/users/{usersId}", + "httpMethod": "GET", + "id": "alloydb.projects.locations.clusters.users.get", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Required. The name of the resource. For the required format, see the comment on the User.name field.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/clusters/[^/]+/users/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1/{+name}", + "response": { + "$ref": "User" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "list": { + "description": "Lists Users in a given project and location.", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/clusters/{clustersId}/users", + "httpMethod": "GET", + "id": "alloydb.projects.locations.clusters.users.list", + "parameterOrder": [ + "parent" + ], + "parameters": { + "filter": { + "description": "Optional. Filtering results", + "location": "query", + "type": "string" + }, + "orderBy": { + "description": "Optional. Hint for how to order the results", + "location": "query", + "type": "string" + }, + "pageSize": { + "description": "Optional. Requested page size. Server may return fewer items than requested. If unspecified, server will pick an appropriate default.", + "format": "int32", + "location": "query", + "type": "integer" + }, + "pageToken": { + "description": "Optional. A token identifying a page of results the server should return.", + "location": "query", + "type": "string" + }, + "parent": { + "description": "Required. Parent value for ListUsersRequest", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/clusters/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1/{+parent}/users", + "response": { + "$ref": "ListUsersResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "patch": { + "description": "Updates the parameters of a single User.", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/clusters/{clustersId}/users/{usersId}", + "httpMethod": "PATCH", + "id": "alloydb.projects.locations.clusters.users.patch", + "parameterOrder": [ + "name" + ], + "parameters": { + "allowMissing": { + "description": "Optional. Allow missing fields in the update mask.", + "location": "query", + "type": "boolean" + }, + "name": { + "description": "Output only. Name of the resource in the form of projects/{project}/locations/{location}/cluster/{cluster}/users/{user}.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/clusters/[^/]+/users/[^/]+$", + "required": true, + "type": "string" + }, + "requestId": { + "description": "Optional. An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. The server will guarantee that for at least 60 minutes since the first request. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", + "location": "query", + "type": "string" + }, + "updateMask": { + "description": "Optional. Field mask is used to specify the fields to be overwritten in the User resource by the update. The fields specified in the update_mask are relative to the resource, not the full request. A field will be overwritten if it is in the mask. If the user does not provide a mask then all fields will be overwritten.", + "format": "google-fieldmask", + "location": "query", + "type": "string" + }, + "validateOnly": { + "description": "Optional. If set, the backend validates the request, but doesn't actually execute it.", + "location": "query", + "type": "boolean" + } + }, + "path": "v1/{+name}", + "request": { + "$ref": "User" + }, + "response": { + "$ref": "User" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + } + } + } + } + }, + "operations": { + "methods": { + "cancel": { + "description": "Starts asynchronous cancellation on a long-running operation. The server makes a best effort to cancel the operation, but success is not guaranteed. If the server doesn't support this method, it returns `google.rpc.Code.UNIMPLEMENTED`. Clients can use Operations.GetOperation or other methods to check whether the cancellation succeeded or whether the operation completed despite cancellation. On successful cancellation, the operation is not deleted; instead, it becomes an operation with an Operation.error value with a google.rpc.Status.code of 1, corresponding to `Code.CANCELLED`.", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/operations/{operationsId}:cancel", + "httpMethod": "POST", + "id": "alloydb.projects.locations.operations.cancel", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "The name of the operation resource to be cancelled.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/operations/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1/{+name}:cancel", + "request": { + "$ref": "CancelOperationRequest" + }, + "response": { + "$ref": "Empty" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "delete": { + "description": "Deletes a long-running operation. This method indicates that the client is no longer interested in the operation result. It does not cancel the operation. If the server doesn't support this method, it returns `google.rpc.Code.UNIMPLEMENTED`.", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/operations/{operationsId}", + "httpMethod": "DELETE", + "id": "alloydb.projects.locations.operations.delete", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "The name of the operation resource to be deleted.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/operations/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1/{+name}", + "response": { + "$ref": "Empty" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "get": { + "description": "Gets the latest state of a long-running operation. Clients can use this method to poll the operation result at intervals as recommended by the API service.", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/operations/{operationsId}", + "httpMethod": "GET", + "id": "alloydb.projects.locations.operations.get", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "The name of the operation resource.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/operations/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1/{+name}", + "response": { + "$ref": "Operation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "list": { + "description": "Lists operations that match the specified filter in the request. If the server doesn't support this method, it returns `UNIMPLEMENTED`.", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/operations", + "httpMethod": "GET", + "id": "alloydb.projects.locations.operations.list", + "parameterOrder": [ + "name" + ], + "parameters": { + "filter": { + "description": "The standard list filter.", + "location": "query", + "type": "string" + }, + "name": { + "description": "The name of the operation's parent resource.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+$", + "required": true, + "type": "string" + }, + "pageSize": { + "description": "The standard list page size.", + "format": "int32", + "location": "query", + "type": "integer" + }, + "pageToken": { + "description": "The standard list page token.", + "location": "query", + "type": "string" + } + }, + "path": "v1/{+name}/operations", + "response": { + "$ref": "ListOperationsResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + } + } + }, + "supportedDatabaseFlags": { + "methods": { + "list": { + "description": "Lists SupportedDatabaseFlags for a given project and location.", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/supportedDatabaseFlags", + "httpMethod": "GET", + "id": "alloydb.projects.locations.supportedDatabaseFlags.list", + "parameterOrder": [ + "parent" + ], + "parameters": { + "pageSize": { + "description": "Requested page size. Server may return fewer items than requested. If unspecified, server will pick an appropriate default.", + "format": "int32", + "location": "query", + "type": "integer" + }, + "pageToken": { + "description": "A token identifying a page of results the server should return.", + "location": "query", + "type": "string" + }, + "parent": { + "description": "Required. The name of the parent resource. The required format is: * projects/{project}/locations/{location} Regardless of the parent specified here, as long it is contains a valid project and location, the service will return a static list of supported flags resources. Note that we do not yet support region-specific flags.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1/{+parent}/supportedDatabaseFlags", + "response": { + "$ref": "ListSupportedDatabaseFlagsResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + } + } + } + } + } + } + } + }, + "revision": "20230821", + "rootUrl": "https://alloydb.googleapis.com/", + "schemas": { + "AutomatedBackupPolicy": { + "description": "Message describing the user-specified automated backup policy. All fields in the automated backup policy are optional. Defaults for each field are provided if they are not set.", + "id": "AutomatedBackupPolicy", + "properties": { + "backupWindow": { + "description": "The length of the time window during which a backup can be taken. If a backup does not succeed within this time window, it will be canceled and considered failed. The backup window must be at least 5 minutes long. There is no upper bound on the window. If not set, it defaults to 1 hour.", + "format": "google-duration", + "type": "string" + }, + "enabled": { + "description": "Whether automated automated backups are enabled. If not set, defaults to true.", + "type": "boolean" + }, + "encryptionConfig": { + "$ref": "EncryptionConfig", + "description": "Optional. The encryption config can be specified to encrypt the backups with a customer-managed encryption key (CMEK). When this field is not specified, the backup will then use default encryption scheme to protect the user data." + }, + "labels": { + "additionalProperties": { + "type": "string" + }, + "description": "Labels to apply to backups created using this configuration.", + "type": "object" + }, + "location": { + "description": "The location where the backup will be stored. Currently, the only supported option is to store the backup in the same region as the cluster. If empty, defaults to the region of the cluster.", + "type": "string" + }, + "quantityBasedRetention": { + "$ref": "QuantityBasedRetention", + "description": "Quantity-based Backup retention policy to retain recent backups." + }, + "timeBasedRetention": { + "$ref": "TimeBasedRetention", + "description": "Time-based Backup retention policy." + }, + "weeklySchedule": { + "$ref": "WeeklySchedule", + "description": "Weekly schedule for the Backup." + } + }, + "type": "object" + }, + "Backup": { + "description": "Message describing Backup object", + "id": "Backup", + "properties": { + "annotations": { + "additionalProperties": { + "type": "string" + }, + "description": "Annotations to allow client tools to store small amount of arbitrary data. This is distinct from labels. https://google.aip.dev/128", + "type": "object" + }, + "clusterName": { + "description": "Required. The full resource name of the backup source cluster (e.g., projects/{project}/locations/{region}/clusters/{cluster_id}).", + "type": "string" + }, + "clusterUid": { + "description": "Output only. The system-generated UID of the cluster which was used to create this resource.", + "readOnly": true, + "type": "string" + }, + "createTime": { + "description": "Output only. Create time stamp", + "format": "google-datetime", + "readOnly": true, + "type": "string" + }, + "databaseVersion": { + "description": "Output only. The database engine major version of the cluster this backup was created from. Any restored cluster created from this backup will have the same database version.", + "enum": [ + "DATABASE_VERSION_UNSPECIFIED", + "POSTGRES_13", + "POSTGRES_14" + ], + "enumDeprecated": [ + false, + true, + false + ], + "enumDescriptions": [ + "This is an unknown database version.", + "DEPRECATED - The database version is Postgres 13.", + "The database version is Postgres 14." + ], + "readOnly": true, + "type": "string" + }, + "deleteTime": { + "description": "Output only. Delete time stamp", + "format": "google-datetime", + "readOnly": true, + "type": "string" + }, + "description": { + "description": "User-provided description of the backup.", + "type": "string" + }, + "displayName": { + "description": "User-settable and human-readable display name for the Backup.", + "type": "string" + }, + "encryptionConfig": { + "$ref": "EncryptionConfig", + "description": "Optional. The encryption config can be specified to encrypt the backup with a customer-managed encryption key (CMEK). When this field is not specified, the backup will then use default encryption scheme to protect the user data." + }, + "encryptionInfo": { + "$ref": "EncryptionInfo", + "description": "Output only. The encryption information for the backup.", + "readOnly": true + }, + "etag": { + "description": "For Resource freshness validation (https://google.aip.dev/154)", + "type": "string" + }, + "expiryQuantity": { + "$ref": "QuantityBasedExpiry", + "description": "Output only. The QuantityBasedExpiry of the backup, specified by the backup's retention policy. Once the expiry quantity is over retention, the backup is eligible to be garbage collected.", + "readOnly": true + }, + "expiryTime": { + "description": "Output only. The time at which after the backup is eligible to be garbage collected. It is the duration specified by the backup's retention policy, added to the backup's create_time.", + "format": "google-datetime", + "readOnly": true, + "type": "string" + }, + "labels": { + "additionalProperties": { + "type": "string" + }, + "description": "Labels as key value pairs", + "type": "object" + }, + "name": { + "description": "Output only. The name of the backup resource with the format: * projects/{project}/locations/{region}/backups/{backup_id} where the cluster and backup ID segments should satisfy the regex expression `[a-z]([a-z0-9-]{0,61}[a-z0-9])?`, e.g. 1-63 characters of lowercase letters, numbers, and dashes, starting with a letter, and ending with a letter or number. For more details see https://google.aip.dev/122. The prefix of the backup resource name is the name of the parent resource: * projects/{project}/locations/{region}", + "readOnly": true, + "type": "string" + }, + "reconciling": { + "description": "Output only. Reconciling (https://google.aip.dev/128#reconciliation), if true, indicates that the service is actively updating the resource. This can happen due to user-triggered updates or system actions like failover or maintenance.", + "readOnly": true, + "type": "boolean" + }, + "sizeBytes": { + "description": "Output only. The size of the backup in bytes.", + "format": "int64", + "readOnly": true, + "type": "string" + }, + "state": { + "description": "Output only. The current state of the backup.", + "enum": [ + "STATE_UNSPECIFIED", + "READY", + "CREATING", + "FAILED", + "DELETING" + ], + "enumDescriptions": [ + "The state of the backup is unknown.", + "The backup is ready.", + "The backup is creating.", + "The backup failed.", + "The backup is being deleted." + ], + "readOnly": true, + "type": "string" + }, + "type": { + "description": "The backup type, which suggests the trigger for the backup.", + "enum": [ + "TYPE_UNSPECIFIED", + "ON_DEMAND", + "AUTOMATED", + "CONTINUOUS" + ], + "enumDescriptions": [ + "Backup Type is unknown.", + "ON_DEMAND backups that were triggered by the customer (e.g., not AUTOMATED).", + "AUTOMATED backups triggered by the automated backups scheduler pursuant to an automated backup policy.", + "CONTINUOUS backups triggered by the automated backups scheduler due to a continuous backup policy." + ], + "type": "string" + }, + "uid": { + "description": "Output only. The system-generated UID of the resource. The UID is assigned when the resource is created, and it is retained until it is deleted.", + "readOnly": true, + "type": "string" + }, + "updateTime": { + "description": "Output only. Update time stamp", + "format": "google-datetime", + "readOnly": true, + "type": "string" + } + }, + "type": "object" + }, + "BackupSource": { + "description": "Message describing a BackupSource.", + "id": "BackupSource", + "properties": { + "backupName": { + "description": "Required. The name of the backup resource with the format: * projects/{project}/locations/{region}/backups/{backup_id}", + "type": "string" + }, + "backupUid": { + "description": "Output only. The system-generated UID of the backup which was used to create this resource. The UID is generated when the backup is created, and it is retained until the backup is deleted.", + "readOnly": true, + "type": "string" + } + }, + "type": "object" + }, + "CancelOperationRequest": { + "description": "The request message for Operations.CancelOperation.", + "id": "CancelOperationRequest", + "properties": {}, + "type": "object" + }, + "ClientConnectionConfig": { + "description": "Client connection configuration", + "id": "ClientConnectionConfig", + "properties": { + "requireConnectors": { + "description": "Optional. Configuration to enforce connectors only (ex: AuthProxy) connections to the database.", + "type": "boolean" + }, + "sslConfig": { + "$ref": "SslConfig", + "description": "Optional. SSL config option for this instance." + } + }, + "type": "object" + }, + "CloudControl2SharedOperationsReconciliationOperationMetadata": { + "description": "Operation metadata returned by the CLH during resource state reconciliation.", + "id": "CloudControl2SharedOperationsReconciliationOperationMetadata", + "properties": { + "deleteResource": { + "deprecated": true, + "description": "DEPRECATED. Use exclusive_action instead.", + "type": "boolean" + }, + "exclusiveAction": { + "description": "Excluisive action returned by the CLH.", + "enum": [ + "UNKNOWN_REPAIR_ACTION", + "DELETE", + "RETRY" + ], + "enumDeprecated": [ + false, + true, + false + ], + "enumDescriptions": [ + "Unknown repair action.", + "The resource has to be deleted. When using this bit, the CLH should fail the operation. DEPRECATED. Instead use DELETE_RESOURCE OperationSignal in SideChannel.", + "This resource could not be repaired but the repair should be tried again at a later time. This can happen if there is a dependency that needs to be resolved first- e.g. if a parent resource must be repaired before a child resource." + ], + "type": "string" + } + }, + "type": "object" + }, + "Cluster": { + "description": "A cluster is a collection of regional AlloyDB resources. It can include a primary instance and one or more read pool instances. All cluster resources share a storage layer, which scales as needed.", + "id": "Cluster", + "properties": { + "annotations": { + "additionalProperties": { + "type": "string" + }, + "description": "Annotations to allow client tools to store small amount of arbitrary data. This is distinct from labels. https://google.aip.dev/128", + "type": "object" + }, + "automatedBackupPolicy": { + "$ref": "AutomatedBackupPolicy", + "description": "The automated backup policy for this cluster. If no policy is provided then the default policy will be used. If backups are supported for the cluster, the default policy takes one backup a day, has a backup window of 1 hour, and retains backups for 14 days. For more information on the defaults, consult the documentation for the message type." + }, + "backupSource": { + "$ref": "BackupSource", + "description": "Output only. Cluster created from backup.", + "readOnly": true + }, + "clusterType": { + "description": "Output only. The type of the cluster. This is an output-only field and it's populated at the Cluster creation time or the Cluster promotion time. The cluster type is determined by which RPC was used to create the cluster (i.e. `CreateCluster` vs. `CreateSecondaryCluster`", + "enum": [ + "CLUSTER_TYPE_UNSPECIFIED", + "PRIMARY", + "SECONDARY" + ], + "enumDescriptions": [ + "The type of the cluster is unknown.", + "Primary cluster that support read and write operations.", + "Secondary cluster that is replicating from another region. This only supports read." + ], + "readOnly": true, + "type": "string" + }, + "continuousBackupConfig": { + "$ref": "ContinuousBackupConfig", + "description": "Optional. Continuous backup configuration for this cluster." + }, + "continuousBackupInfo": { + "$ref": "ContinuousBackupInfo", + "description": "Output only. Continuous backup properties for this cluster.", + "readOnly": true + }, + "createTime": { + "description": "Output only. Create time stamp", + "format": "google-datetime", + "readOnly": true, + "type": "string" + }, + "databaseVersion": { + "description": "Optional. The database engine major version. This is an optional field and it is populated at the Cluster creation time. If a database version is not supplied at cluster creation time, then a default database version will be used.", + "enum": [ + "DATABASE_VERSION_UNSPECIFIED", + "POSTGRES_13", + "POSTGRES_14" + ], + "enumDeprecated": [ + false, + true, + false + ], + "enumDescriptions": [ + "This is an unknown database version.", + "DEPRECATED - The database version is Postgres 13.", + "The database version is Postgres 14." + ], + "type": "string" + }, + "deleteTime": { + "description": "Output only. Delete time stamp", + "format": "google-datetime", + "readOnly": true, + "type": "string" + }, + "displayName": { + "description": "User-settable and human-readable display name for the Cluster.", + "type": "string" + }, + "encryptionConfig": { + "$ref": "EncryptionConfig", + "description": "Optional. The encryption config can be specified to encrypt the data disks and other persistent data resources of a cluster with a customer-managed encryption key (CMEK). When this field is not specified, the cluster will then use default encryption scheme to protect the user data." + }, + "encryptionInfo": { + "$ref": "EncryptionInfo", + "description": "Output only. The encryption information for the cluster.", + "readOnly": true + }, + "etag": { + "description": "For Resource freshness validation (https://google.aip.dev/154)", + "type": "string" + }, + "initialUser": { + "$ref": "UserPassword", + "description": "Input only. Initial user to setup during cluster creation. Required. If used in `RestoreCluster` this is ignored." + }, + "labels": { + "additionalProperties": { + "type": "string" + }, + "description": "Labels as key value pairs", + "type": "object" + }, + "migrationSource": { + "$ref": "MigrationSource", + "description": "Output only. Cluster created via DMS migration.", + "readOnly": true + }, + "name": { + "description": "Output only. The name of the cluster resource with the format: * projects/{project}/locations/{region}/clusters/{cluster_id} where the cluster ID segment should satisfy the regex expression `[a-z0-9-]+`. For more details see https://google.aip.dev/122. The prefix of the cluster resource name is the name of the parent resource: * projects/{project}/locations/{region}", + "readOnly": true, + "type": "string" + }, + "network": { + "deprecated": true, + "description": "Required. The resource link for the VPC network in which cluster resources are created and from which they are accessible via Private IP. The network must belong to the same project as the cluster. It is specified in the form: \"projects/{project}/global/networks/{network_id}\". This is required to create a cluster. It can be updated, but it cannot be removed. Deprecated, use network_config.network instead.", + "type": "string" + }, + "networkConfig": { + "$ref": "NetworkConfig" + }, + "primaryConfig": { + "$ref": "PrimaryConfig", + "description": "Output only. Cross Region replication config specific to PRIMARY cluster.", + "readOnly": true + }, + "reconciling": { + "description": "Output only. Reconciling (https://google.aip.dev/128#reconciliation). Set to true if the current state of Cluster does not match the user's intended state, and the service is actively updating the resource to reconcile them. This can happen due to user-triggered updates or system actions like failover or maintenance.", + "readOnly": true, + "type": "boolean" + }, + "secondaryConfig": { + "$ref": "SecondaryConfig", + "description": "Cross Region replication config specific to SECONDARY cluster." + }, + "sslConfig": { + "$ref": "SslConfig", + "deprecated": true, + "description": "SSL configuration for this AlloyDB cluster." + }, + "state": { + "description": "Output only. The current serving state of the cluster.", + "enum": [ + "STATE_UNSPECIFIED", + "READY", + "STOPPED", + "EMPTY", + "CREATING", + "DELETING", + "FAILED", + "BOOTSTRAPPING", + "MAINTENANCE", + "PROMOTING" + ], + "enumDescriptions": [ + "The state of the cluster is unknown.", + "The cluster is active and running.", + "The cluster is stopped. All instances in the cluster are stopped. Customers can start a stopped cluster at any point and all their instances will come back to life with same names and IP resources. In this state, customer pays for storage. Associated backups could also be present in a stopped cluster.", + "The cluster is empty and has no associated resources. All instances, associated storage and backups have been deleted.", + "The cluster is being created.", + "The cluster is being deleted.", + "The creation of the cluster failed.", + "The cluster is bootstrapping with data from some other source. Direct mutations to the cluster (e.g. adding read pool) are not allowed.", + "The cluster is under maintenance. AlloyDB regularly performs maintenance and upgrades on customer clusters. Updates on the cluster are not allowed while the cluster is in this state.", + "The cluster is being promoted." + ], + "readOnly": true, + "type": "string" + }, + "uid": { + "description": "Output only. The system-generated UID of the resource. The UID is assigned when the resource is created, and it is retained until it is deleted.", + "readOnly": true, + "type": "string" + }, + "updateTime": { + "description": "Output only. Update time stamp", + "format": "google-datetime", + "readOnly": true, + "type": "string" + } + }, + "type": "object" + }, + "ContinuousBackupConfig": { + "description": "ContinuousBackupConfig describes the continuous backups recovery configurations of a cluster.", + "id": "ContinuousBackupConfig", + "properties": { + "enabled": { + "description": "Whether ContinuousBackup is enabled.", + "type": "boolean" + }, + "encryptionConfig": { + "$ref": "EncryptionConfig", + "description": "The encryption config can be specified to encrypt the backups with a customer-managed encryption key (CMEK). When this field is not specified, the backup will then use default encryption scheme to protect the user data." + }, + "recoveryWindowDays": { + "description": "The number of days that are eligible to restore from using PITR. To support the entire recovery window, backups and logs are retained for one day more than the recovery window. If not set, defaults to 14 days.", + "format": "int32", + "type": "integer" + } + }, + "type": "object" + }, + "ContinuousBackupInfo": { + "description": "ContinuousBackupInfo describes the continuous backup properties of a cluster.", + "id": "ContinuousBackupInfo", + "properties": { + "earliestRestorableTime": { + "description": "Output only. The earliest restorable time that can be restored to. Output only field.", + "format": "google-datetime", + "readOnly": true, + "type": "string" + }, + "enabledTime": { + "description": "Output only. When ContinuousBackup was most recently enabled. Set to null if ContinuousBackup is not enabled.", + "format": "google-datetime", + "readOnly": true, + "type": "string" + }, + "encryptionInfo": { + "$ref": "EncryptionInfo", + "description": "Output only. The encryption information for the WALs and backups required for ContinuousBackup.", + "readOnly": true + }, + "schedule": { + "description": "Output only. Days of the week on which a continuous backup is taken. Output only field. Ignored if passed into the request.", + "items": { + "enum": [ + "DAY_OF_WEEK_UNSPECIFIED", + "MONDAY", + "TUESDAY", + "WEDNESDAY", + "THURSDAY", + "FRIDAY", + "SATURDAY", + "SUNDAY" + ], + "enumDescriptions": [ + "The day of the week is unspecified.", + "Monday", + "Tuesday", + "Wednesday", + "Thursday", + "Friday", + "Saturday", + "Sunday" + ], + "type": "string" + }, + "readOnly": true, + "type": "array" + } + }, + "type": "object" + }, + "ContinuousBackupSource": { + "description": "Message describing a ContinuousBackupSource.", + "id": "ContinuousBackupSource", + "properties": { + "cluster": { + "description": "Required. The source cluster from which to restore. This cluster must have continuous backup enabled for this operation to succeed. For the required format, see the comment on the Cluster.name field.", + "type": "string" + }, + "pointInTime": { + "description": "Required. The point in time to restore to.", + "format": "google-datetime", + "type": "string" + } + }, + "type": "object" + }, + "Empty": { + "description": "A generic empty message that you can re-use to avoid defining duplicated empty messages in your APIs. A typical example is to use it as the request or the response type of an API method. For instance: service Foo { rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty); }", + "id": "Empty", + "properties": {}, + "type": "object" + }, + "EncryptionConfig": { + "description": "EncryptionConfig describes the encryption config of a cluster or a backup that is encrypted with a CMEK (customer-managed encryption key).", + "id": "EncryptionConfig", + "properties": { + "kmsKeyName": { + "description": "The fully-qualified resource name of the KMS key. Each Cloud KMS key is regionalized and has the following format: projects/[PROJECT]/locations/[REGION]/keyRings/[RING]/cryptoKeys/[KEY_NAME]", + "type": "string" + } + }, + "type": "object" + }, + "EncryptionInfo": { + "description": "EncryptionInfo describes the encryption information of a cluster or a backup.", + "id": "EncryptionInfo", + "properties": { + "encryptionType": { + "description": "Output only. Type of encryption.", + "enum": [ + "TYPE_UNSPECIFIED", + "GOOGLE_DEFAULT_ENCRYPTION", + "CUSTOMER_MANAGED_ENCRYPTION" + ], + "enumDescriptions": [ + "Encryption type not specified. Defaults to GOOGLE_DEFAULT_ENCRYPTION.", + "The data is encrypted at rest with a key that is fully managed by Google. No key version will be populated. This is the default state.", + "The data is encrypted at rest with a key that is managed by the customer. KMS key versions will be populated." + ], + "readOnly": true, + "type": "string" + }, + "kmsKeyVersions": { + "description": "Output only. Cloud KMS key versions that are being used to protect the database or the backup.", + "items": { + "type": "string" + }, + "readOnly": true, + "type": "array" + } + }, + "type": "object" + }, + "FailoverInstanceRequest": { + "description": "Message for triggering failover on an Instance", + "id": "FailoverInstanceRequest", + "properties": { + "requestId": { + "description": "Optional. An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. The server will guarantee that for at least 60 minutes after the first request. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", + "type": "string" + }, + "validateOnly": { + "description": "Optional. If set, performs request validation (e.g. permission checks and any other type of validation), but do not actually execute the failover.", + "type": "boolean" + } + }, + "type": "object" + }, + "GoogleCloudLocationListLocationsResponse": { + "description": "The response message for Locations.ListLocations.", + "id": "GoogleCloudLocationListLocationsResponse", + "properties": { + "locations": { + "description": "A list of locations that matches the specified filter in the request.", + "items": { + "$ref": "GoogleCloudLocationLocation" + }, + "type": "array" + }, + "nextPageToken": { + "description": "The standard List next-page token.", + "type": "string" + } + }, + "type": "object" + }, + "GoogleCloudLocationLocation": { + "description": "A resource that represents a Google Cloud location.", + "id": "GoogleCloudLocationLocation", + "properties": { + "displayName": { + "description": "The friendly name for this location, typically a nearby city name. For example, \"Tokyo\".", + "type": "string" + }, + "labels": { + "additionalProperties": { + "type": "string" + }, + "description": "Cross-service attributes for the location. For example {\"cloud.googleapis.com/region\": \"us-east1\"}", + "type": "object" + }, + "locationId": { + "description": "The canonical id for this location. For example: `\"us-east1\"`.", + "type": "string" + }, + "metadata": { + "additionalProperties": { + "description": "Properties of the object. Contains field @type with type URL.", + "type": "any" + }, + "description": "Service-specific metadata. For example the available capacity at the given location.", + "type": "object" + }, + "name": { + "description": "Resource name for the location, which may vary between implementations. For example: `\"projects/example-project/locations/us-east1\"`", + "type": "string" + } + }, + "type": "object" + }, + "GoogleTypeTimeOfDay": { + "description": "Represents a time of day. The date and time zone are either not significant or are specified elsewhere. An API may choose to allow leap seconds. Related types are google.type.Date and `google.protobuf.Timestamp`.", + "id": "GoogleTypeTimeOfDay", + "properties": { + "hours": { + "description": "Hours of day in 24 hour format. Should be from 0 to 23. An API may choose to allow the value \"24:00:00\" for scenarios like business closing time.", + "format": "int32", + "type": "integer" + }, + "minutes": { + "description": "Minutes of hour of day. Must be from 0 to 59.", + "format": "int32", + "type": "integer" + }, + "nanos": { + "description": "Fractions of seconds in nanoseconds. Must be from 0 to 999,999,999.", + "format": "int32", + "type": "integer" + }, + "seconds": { + "description": "Seconds of minutes of the time. Must normally be from 0 to 59. An API may allow the value 60 if it allows leap-seconds.", + "format": "int32", + "type": "integer" + } + }, + "type": "object" + }, + "InjectFaultRequest": { + "description": "Message for triggering fault injection on an instance", + "id": "InjectFaultRequest", + "properties": { + "faultType": { + "description": "Required. The type of fault to be injected in an instance.", + "enum": [ + "FAULT_TYPE_UNSPECIFIED", + "STOP_VM" + ], + "enumDescriptions": [ + "The fault type is unknown.", + "Stop the VM" + ], + "type": "string" + }, + "requestId": { + "description": "Optional. An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. The server will guarantee that for at least 60 minutes after the first request. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", + "type": "string" + }, + "validateOnly": { + "description": "Optional. If set, performs request validation (e.g. permission checks and any other type of validation), but do not actually execute the fault injection.", + "type": "boolean" + } + }, + "type": "object" + }, + "Instance": { + "description": "An Instance is a computing unit that an end customer can connect to. It's the main unit of computing resources in AlloyDB.", + "id": "Instance", + "properties": { + "annotations": { + "additionalProperties": { + "type": "string" + }, + "description": "Annotations to allow client tools to store small amount of arbitrary data. This is distinct from labels. https://google.aip.dev/128", + "type": "object" + }, + "availabilityType": { + "description": "Availability type of an Instance. If empty, defaults to REGIONAL for primary instances. For read pools, availability_type is always UNSPECIFIED. Instances in the read pools are evenly distributed across available zones within the region (i.e. read pools with more than one node will have a node in at least two zones).", + "enum": [ + "AVAILABILITY_TYPE_UNSPECIFIED", + "ZONAL", + "REGIONAL" + ], + "enumDescriptions": [ + "This is an unknown Availability type.", + "Zonal available instance.", + "Regional (or Highly) available instance." + ], + "type": "string" + }, + "clientConnectionConfig": { + "$ref": "ClientConnectionConfig", + "description": "Optional. Client connection specific configurations" + }, + "createTime": { + "description": "Output only. Create time stamp", + "format": "google-datetime", + "readOnly": true, + "type": "string" + }, + "databaseFlags": { + "additionalProperties": { + "type": "string" + }, + "description": "Database flags. Set at instance level. * They are copied from primary instance on read instance creation. * Read instances can set new or override existing flags that are relevant for reads, e.g. for enabling columnar cache on a read instance. Flags set on read instance may or may not be present on primary. This is a list of \"key\": \"value\" pairs. \"key\": The name of the flag. These flags are passed at instance setup time, so include both server options and system variables for Postgres. Flags are specified with underscores, not hyphens. \"value\": The value of the flag. Booleans are set to **on** for true and **off** for false. This field must be omitted if the flag doesn't take a value.", + "type": "object" + }, + "deleteTime": { + "description": "Output only. Delete time stamp", + "format": "google-datetime", + "readOnly": true, + "type": "string" + }, + "displayName": { + "description": "User-settable and human-readable display name for the Instance.", + "type": "string" + }, + "etag": { + "description": "For Resource freshness validation (https://google.aip.dev/154)", + "type": "string" + }, + "gceZone": { + "description": "The Compute Engine zone that the instance should serve from, per https://cloud.google.com/compute/docs/regions-zones This can ONLY be specified for ZONAL instances. If present for a REGIONAL instance, an error will be thrown. If this is absent for a ZONAL instance, instance is created in a random zone with available capacity.", + "type": "string" + }, + "instanceType": { + "description": "Required. The type of the instance. Specified at creation time.", + "enum": [ + "INSTANCE_TYPE_UNSPECIFIED", + "PRIMARY", + "READ_POOL", + "SECONDARY" + ], + "enumDescriptions": [ + "The type of the instance is unknown.", + "PRIMARY instances support read and write operations.", + "READ POOL instances support read operations only. Each read pool instance consists of one or more homogeneous nodes. * Read pool of size 1 can only have zonal availability. * Read pools with node count of 2 or more can have regional availability (nodes are present in 2 or more zones in a region).", + "SECONDARY instances support read operations only. SECONDARY instance is a cross-region read replica" + ], + "type": "string" + }, + "ipAddress": { + "description": "Output only. The IP address for the Instance. This is the connection endpoint for an end-user application.", + "readOnly": true, + "type": "string" + }, + "labels": { + "additionalProperties": { + "type": "string" + }, + "description": "Labels as key value pairs", + "type": "object" + }, + "machineConfig": { + "$ref": "MachineConfig", + "description": "Configurations for the machines that host the underlying database engine." + }, + "name": { + "description": "Output only. The name of the instance resource with the format: * projects/{project}/locations/{region}/clusters/{cluster_id}/instances/{instance_id} where the cluster and instance ID segments should satisfy the regex expression `[a-z]([a-z0-9-]{0,61}[a-z0-9])?`, e.g. 1-63 characters of lowercase letters, numbers, and dashes, starting with a letter, and ending with a letter or number. For more details see https://google.aip.dev/122. The prefix of the instance resource name is the name of the parent resource: * projects/{project}/locations/{region}/clusters/{cluster_id}", + "readOnly": true, + "type": "string" + }, + "nodes": { + "description": "Output only. List of available read-only VMs in this instance, including the standby for a PRIMARY instance.", + "items": { + "$ref": "Node" + }, + "readOnly": true, + "type": "array" + }, + "queryInsightsConfig": { + "$ref": "QueryInsightsInstanceConfig", + "description": "Configuration for query insights." + }, + "readPoolConfig": { + "$ref": "ReadPoolConfig", + "description": "Read pool specific config." + }, + "reconciling": { + "description": "Output only. Reconciling (https://google.aip.dev/128#reconciliation). Set to true if the current state of Instance does not match the user's intended state, and the service is actively updating the resource to reconcile them. This can happen due to user-triggered updates or system actions like failover or maintenance.", + "readOnly": true, + "type": "boolean" + }, + "state": { + "description": "Output only. The current serving state of the instance.", + "enum": [ + "STATE_UNSPECIFIED", + "READY", + "STOPPED", + "CREATING", + "DELETING", + "MAINTENANCE", + "FAILED", + "BOOTSTRAPPING", + "PROMOTING" + ], + "enumDescriptions": [ + "The state of the instance is unknown.", + "The instance is active and running.", + "The instance is stopped. Instance name and IP resources are preserved.", + "The instance is being created.", + "The instance is being deleted.", + "The instance is down for maintenance.", + "The creation of the instance failed or a fatal error occurred during an operation on the instance. Note: Instances in this state would tried to be auto-repaired. And Customers should be able to restart, update or delete these instances.", + "Index 7 is used in the producer apis for ROLLED_BACK state. Keeping that index unused in case that state also needs to exposed via consumer apis in future. The instance has been configured to sync data from some other source.", + "The instance is being promoted." + ], + "readOnly": true, + "type": "string" + }, + "uid": { + "description": "Output only. The system-generated UID of the resource. The UID is assigned when the resource is created, and it is retained until it is deleted.", + "readOnly": true, + "type": "string" + }, + "updateTime": { + "description": "Output only. Update time stamp", + "format": "google-datetime", + "readOnly": true, + "type": "string" + }, + "writableNode": { + "$ref": "Node", + "description": "Output only. This is set for the read-write VM of the PRIMARY instance only.", + "readOnly": true + } + }, + "type": "object" + }, + "IntegerRestrictions": { + "description": "Restrictions on INTEGER type values.", + "id": "IntegerRestrictions", + "properties": { + "maxValue": { + "description": "The maximum value that can be specified, if applicable.", + "format": "int64", + "type": "string" + }, + "minValue": { + "description": "The minimum value that can be specified, if applicable.", + "format": "int64", + "type": "string" + } + }, + "type": "object" + }, + "ListBackupsResponse": { + "description": "Message for response to listing Backups", + "id": "ListBackupsResponse", + "properties": { + "backups": { + "description": "The list of Backup", + "items": { + "$ref": "Backup" + }, + "type": "array" + }, + "nextPageToken": { + "description": "A token identifying a page of results the server should return.", + "type": "string" + }, + "unreachable": { + "description": "Locations that could not be reached.", + "items": { + "type": "string" + }, + "type": "array" + } + }, + "type": "object" + }, + "ListClustersResponse": { + "description": "Message for response to listing Clusters", + "id": "ListClustersResponse", + "properties": { + "clusters": { + "description": "The list of Cluster", + "items": { + "$ref": "Cluster" + }, + "type": "array" + }, + "nextPageToken": { + "description": "A token identifying a page of results the server should return.", + "type": "string" + }, + "unreachable": { + "description": "Locations that could not be reached.", + "items": { + "type": "string" + }, + "type": "array" + } + }, + "type": "object" + }, + "ListInstancesResponse": { + "description": "Message for response to listing Instances", + "id": "ListInstancesResponse", + "properties": { + "instances": { + "description": "The list of Instance", + "items": { + "$ref": "Instance" + }, + "type": "array" + }, + "nextPageToken": { + "description": "A token identifying a page of results the server should return.", + "type": "string" + }, + "unreachable": { + "description": "Locations that could not be reached.", + "items": { + "type": "string" + }, + "type": "array" + } + }, + "type": "object" + }, + "ListOperationsResponse": { + "description": "The response message for Operations.ListOperations.", + "id": "ListOperationsResponse", + "properties": { + "nextPageToken": { + "description": "The standard List next-page token.", + "type": "string" + }, + "operations": { + "description": "A list of operations that matches the specified filter in the request.", + "items": { + "$ref": "Operation" + }, + "type": "array" + } + }, + "type": "object" + }, + "ListSupportedDatabaseFlagsResponse": { + "description": "Message for response to listing SupportedDatabaseFlags.", + "id": "ListSupportedDatabaseFlagsResponse", + "properties": { + "nextPageToken": { + "description": "A token identifying a page of results the server should return.", + "type": "string" + }, + "supportedDatabaseFlags": { + "description": "The list of SupportedDatabaseFlags.", + "items": { + "$ref": "SupportedDatabaseFlag" + }, + "type": "array" + } + }, + "type": "object" + }, + "ListUsersResponse": { + "description": "Message for response to listing Users", + "id": "ListUsersResponse", + "properties": { + "nextPageToken": { + "description": "A token identifying a page of results the server should return.", + "type": "string" + }, + "unreachable": { + "description": "Locations that could not be reached.", + "items": { + "type": "string" + }, + "type": "array" + }, + "users": { + "description": "The list of User", + "items": { + "$ref": "User" + }, + "type": "array" + } + }, + "type": "object" + }, + "MachineConfig": { + "description": "MachineConfig describes the configuration of a machine.", + "id": "MachineConfig", + "properties": { + "cpuCount": { + "description": "The number of CPU's in the VM instance.", + "format": "int32", + "type": "integer" + } + }, + "type": "object" + }, + "MigrationSource": { + "description": "Subset of the source instance configuration that is available when reading the cluster resource.", + "id": "MigrationSource", + "properties": { + "hostPort": { + "description": "Output only. The host and port of the on-premises instance in host:port format", + "readOnly": true, + "type": "string" + }, + "referenceId": { + "description": "Output only. Place holder for the external source identifier(e.g DMS job name) that created the cluster.", + "readOnly": true, + "type": "string" + }, + "sourceType": { + "description": "Output only. Type of migration source.", + "enum": [ + "MIGRATION_SOURCE_TYPE_UNSPECIFIED", + "DMS" + ], + "enumDescriptions": [ + "Migration source is unknown.", + "DMS source means the cluster was created via DMS migration job." + ], + "readOnly": true, + "type": "string" + } + }, + "type": "object" + }, + "NetworkConfig": { + "description": "Metadata related to network configuration.", + "id": "NetworkConfig", + "properties": { + "allocatedIpRange": { + "description": "Optional. Name of the allocated IP range for the private IP AlloyDB cluster, for example: \"google-managed-services-default\". If set, the instance IPs for this cluster will be created in the allocated range. The range name must comply with RFC 1035. Specifically, the name must be 1-63 characters long and match the regular expression [a-z]([-a-z0-9]*[a-z0-9])?. Field name is intended to be consistent with CloudSQL.", + "type": "string" + }, + "network": { + "description": "Required. The resource link for the VPC network in which cluster resources are created and from which they are accessible via Private IP. The network must belong to the same project as the cluster. It is specified in the form: \"projects/{project_number}/global/networks/{network_id}\". This is required to create a cluster. It can be updated, but it cannot be removed.", + "type": "string" + } + }, + "type": "object" + }, + "Node": { + "description": "Details of a single node in the instance. Nodes in an AlloyDB instance are ephemereal, they can change during update, failover, autohealing and resize operations.", + "id": "Node", + "properties": { + "id": { + "description": "The identifier of the VM e.g. \"test-read-0601-407e52be-ms3l\".", + "type": "string" + }, + "ip": { + "description": "The private IP address of the VM e.g. \"10.57.0.34\".", + "type": "string" + }, + "state": { + "description": "Determined by state of the compute VM and postgres-service health. Compute VM state can have values listed in https://cloud.google.com/compute/docs/instances/instance-life-cycle and postgres-service health can have values: HEALTHY and UNHEALTHY.", + "type": "string" + }, + "zoneId": { + "description": "The Compute Engine zone of the VM e.g. \"us-central1-b\".", + "type": "string" + } + }, + "type": "object" + }, + "Operation": { + "description": "This resource represents a long-running operation that is the result of a network API call.", + "id": "Operation", + "properties": { + "done": { + "description": "If the value is `false`, it means the operation is still in progress. If `true`, the operation is completed, and either `error` or `response` is available.", + "type": "boolean" + }, + "error": { + "$ref": "Status", + "description": "The error result of the operation in case of failure or cancellation." + }, + "metadata": { + "additionalProperties": { + "description": "Properties of the object. Contains field @type with type URL.", + "type": "any" + }, + "description": "Service-specific metadata associated with the operation. It typically contains progress information and common metadata such as create time. Some services might not provide such metadata. Any method that returns a long-running operation should document the metadata type, if any.", + "type": "object" + }, + "name": { + "description": "The server-assigned name, which is only unique within the same service that originally returns it. If you use the default HTTP mapping, the `name` should be a resource name ending with `operations/{unique_id}`.", + "type": "string" + }, + "response": { + "additionalProperties": { + "description": "Properties of the object. Contains field @type with type URL.", + "type": "any" + }, + "description": "The normal, successful response of the operation. If the original method returns no data on success, such as `Delete`, the response is `google.protobuf.Empty`. If the original method is standard `Get`/`Create`/`Update`, the response should be the resource. For other methods, the response should have the type `XxxResponse`, where `Xxx` is the original method name. For example, if the original method name is `TakeSnapshot()`, the inferred response type is `TakeSnapshotResponse`.", + "type": "object" + } + }, + "type": "object" + }, + "OperationMetadata": { + "description": "Represents the metadata of the long-running operation.", + "id": "OperationMetadata", + "properties": { + "apiVersion": { + "description": "Output only. API version used to start the operation.", + "readOnly": true, + "type": "string" + }, + "createTime": { + "description": "Output only. The time the operation was created.", + "format": "google-datetime", + "readOnly": true, + "type": "string" + }, + "endTime": { + "description": "Output only. The time the operation finished running.", + "format": "google-datetime", + "readOnly": true, + "type": "string" + }, + "requestedCancellation": { + "description": "Output only. Identifies whether the user has requested cancellation of the operation. Operations that have successfully been cancelled have Operation.error value with a google.rpc.Status.code of 1, corresponding to `Code.CANCELLED`.", + "readOnly": true, + "type": "boolean" + }, + "statusMessage": { + "description": "Output only. Human-readable status of the operation, if any.", + "readOnly": true, + "type": "string" + }, + "target": { + "description": "Output only. Server-defined resource path for the target of the operation.", + "readOnly": true, + "type": "string" + }, + "verb": { + "description": "Output only. Name of the verb executed by the operation.", + "readOnly": true, + "type": "string" + } + }, + "type": "object" + }, + "PrimaryConfig": { + "description": "Configuration for the primary cluster. It has the list of clusters that are replicating from this cluster. This should be set if and only if the cluster is of type PRIMARY.", + "id": "PrimaryConfig", + "properties": { + "secondaryClusterNames": { + "description": "Output only. Names of the clusters that are replicating from this cluster.", + "items": { + "type": "string" + }, + "readOnly": true, + "type": "array" + } + }, + "type": "object" + }, + "PromoteClusterRequest": { + "description": "Message for promoting a Cluster", + "id": "PromoteClusterRequest", + "properties": { + "etag": { + "description": "Optional. The current etag of the Cluster. If an etag is provided and does not match the current etag of the Cluster, deletion will be blocked and an ABORTED error will be returned.", + "type": "string" + }, + "requestId": { + "description": "Optional. An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. The server will guarantee that for at least 60 minutes after the first request. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", + "type": "string" + }, + "validateOnly": { + "description": "Optional. If set, performs request validation (e.g. permission checks and any other type of validation), but do not actually execute the delete.", + "type": "boolean" + } + }, + "type": "object" + }, + "QuantityBasedExpiry": { + "description": "A backup's position in a quantity-based retention queue, of backups with the same source cluster and type, with length, retention, specified by the backup's retention policy. Once the position is greater than the retention, the backup is eligible to be garbage collected. Example: 5 backups from the same source cluster and type with a quantity-based retention of 3 and denoted by backup_id (position, retention). Safe: backup_5 (1, 3), backup_4, (2, 3), backup_3 (3, 3). Awaiting garbage collection: backup_2 (4, 3), backup_1 (5, 3)", + "id": "QuantityBasedExpiry", + "properties": { + "retentionCount": { + "description": "Output only. The backup's position among its backups with the same source cluster and type, by descending chronological order create time(i.e. newest first).", + "format": "int32", + "readOnly": true, + "type": "integer" + }, + "totalRetentionCount": { + "description": "Output only. The length of the quantity-based queue, specified by the backup's retention policy.", + "format": "int32", + "readOnly": true, + "type": "integer" + } + }, + "type": "object" + }, + "QuantityBasedRetention": { + "description": "A quantity based policy specifies that a certain number of the most recent successful backups should be retained.", + "id": "QuantityBasedRetention", + "properties": { + "count": { + "description": "The number of backups to retain.", + "format": "int32", + "type": "integer" + } + }, + "type": "object" + }, + "QueryInsightsInstanceConfig": { + "description": "QueryInsights Instance specific configuration.", + "id": "QueryInsightsInstanceConfig", + "properties": { + "queryPlansPerMinute": { + "description": "Number of query execution plans captured by Insights per minute for all queries combined. The default value is 5. Any integer between 0 and 20 is considered valid.", + "format": "uint32", + "type": "integer" + }, + "queryStringLength": { + "description": "Query string length. The default value is 1024. Any integer between 256 and 4500 is considered valid.", + "format": "uint32", + "type": "integer" + }, + "recordApplicationTags": { + "description": "Record application tags for an instance. This flag is turned \"on\" by default.", + "type": "boolean" + }, + "recordClientAddress": { + "description": "Record client address for an instance. Client address is PII information. This flag is turned \"on\" by default.", + "type": "boolean" + } + }, + "type": "object" + }, + "ReadPoolConfig": { + "description": "Configuration for a read pool instance.", + "id": "ReadPoolConfig", + "properties": { + "nodeCount": { + "description": "Read capacity, i.e. number of nodes in a read pool instance.", + "format": "int32", + "type": "integer" + } + }, + "type": "object" + }, + "RestartInstanceRequest": { + "id": "RestartInstanceRequest", + "properties": { + "requestId": { + "description": "Optional. An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. The server will guarantee that for at least 60 minutes after the first request. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", + "type": "string" + }, + "validateOnly": { + "description": "Optional. If set, performs request validation (e.g. permission checks and any other type of validation), but do not actually execute the restart.", + "type": "boolean" + } + }, + "type": "object" + }, + "RestoreClusterRequest": { + "description": "Message for restoring a Cluster from a backup or another cluster at a given point in time.", + "id": "RestoreClusterRequest", + "properties": { + "backupSource": { + "$ref": "BackupSource", + "description": "Backup source." + }, + "cluster": { + "$ref": "Cluster", + "description": "Required. The resource being created" + }, + "clusterId": { + "description": "Required. ID of the requesting object.", + "type": "string" + }, + "continuousBackupSource": { + "$ref": "ContinuousBackupSource", + "description": "ContinuousBackup source. Continuous backup needs to be enabled in the source cluster for this operation to succeed." + }, + "requestId": { + "description": "Optional. An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. The server will guarantee that for at least 60 minutes since the first request. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", + "type": "string" + }, + "validateOnly": { + "description": "Optional. If set, performs request validation (e.g. permission checks and any other type of validation), but do not actually execute the import request.", + "type": "boolean" + } + }, + "type": "object" + }, + "SecondaryConfig": { + "description": "Configuration information for the secondary cluster. This should be set if and only if the cluster is of type SECONDARY.", + "id": "SecondaryConfig", + "properties": { + "primaryClusterName": { + "description": "The name of the primary cluster name with the format: * projects/{project}/locations/{region}/clusters/{cluster_id}", + "type": "string" + } + }, + "type": "object" + }, + "SslConfig": { + "description": "SSL configuration.", + "id": "SslConfig", + "properties": { + "caSource": { + "description": "Optional. Certificate Authority (CA) source. Only CA_SOURCE_MANAGED is supported currently, and is the default value.", + "enum": [ + "CA_SOURCE_UNSPECIFIED", + "CA_SOURCE_MANAGED" + ], + "enumDescriptions": [ + "Certificate Authority (CA) source not specified. Defaults to CA_SOURCE_MANAGED.", + "Certificate Authority (CA) managed by the AlloyDB Cluster." + ], + "type": "string" + }, + "sslMode": { + "description": "Optional. SSL mode. Specifies client-server SSL/TLS connection behavior.", + "enum": [ + "SSL_MODE_UNSPECIFIED", + "SSL_MODE_ALLOW", + "SSL_MODE_REQUIRE", + "SSL_MODE_VERIFY_CA", + "ALLOW_UNENCRYPTED_AND_ENCRYPTED", + "ENCRYPTED_ONLY" + ], + "enumDeprecated": [ + false, + true, + true, + true, + false, + false + ], + "enumDescriptions": [ + "SSL mode not specified. Defaults to ENCRYPTED_ONLY.", + "SSL connections are optional. CA verification not enforced.", + "SSL connections are required. CA verification not enforced. Clients may use locally self-signed certificates (default psql client behavior).", + "SSL connections are required. CA verification enforced. Clients must have certificates signed by a Cluster CA, e.g. via GenerateClientCertificate.", + "SSL connections are optional. CA verification not enforced.", + "SSL connections are required. CA verification not enforced." + ], + "type": "string" + } + }, + "type": "object" + }, + "Status": { + "description": "The `Status` type defines a logical error model that is suitable for different programming environments, including REST APIs and RPC APIs. It is used by [gRPC](https://github.com/grpc). Each `Status` message contains three pieces of data: error code, error message, and error details. You can find out more about this error model and how to work with it in the [API Design Guide](https://cloud.google.com/apis/design/errors).", + "id": "Status", + "properties": { + "code": { + "description": "The status code, which should be an enum value of google.rpc.Code.", + "format": "int32", + "type": "integer" + }, + "details": { + "description": "A list of messages that carry the error details. There is a common set of message types for APIs to use.", + "items": { + "additionalProperties": { + "description": "Properties of the object. Contains field @type with type URL.", + "type": "any" + }, + "type": "object" + }, + "type": "array" + }, + "message": { + "description": "A developer-facing error message, which should be in English. Any user-facing error message should be localized and sent in the google.rpc.Status.details field, or localized by the client.", + "type": "string" + } + }, + "type": "object" + }, + "StorageDatabasecenterPartnerapiV1mainAvailabilityConfiguration": { + "description": "Configuration for availability of database instance", + "id": "StorageDatabasecenterPartnerapiV1mainAvailabilityConfiguration", + "properties": { + "availabilityType": { + "description": "Availability type. Potential values: * `ZONAL`: The instance serves data from only one zone. Outages in that zone affect data accessibility. * `REGIONAL`: The instance can serve data from more than one zone in a region (it is highly available).", + "enum": [ + "AVAILABILITY_TYPE_UNSPECIFIED", + "ZONAL", + "REGIONAL", + "MULTI_REGIONAL", + "AVAILABILITY_TYPE_OTHER" + ], + "enumDescriptions": [ + "", + "Zonal available instance.", + "Regional available instance.", + "Multi regional instance", + "For rest of the other category" + ], + "type": "string" + }, + "externalReplicaConfigured": { + "type": "boolean" + }, + "promotableReplicaConfigured": { + "type": "boolean" + } + }, + "type": "object" + }, + "StorageDatabasecenterPartnerapiV1mainBackupConfiguration": { + "description": "Configuration for automatic backups", + "id": "StorageDatabasecenterPartnerapiV1mainBackupConfiguration", + "properties": { + "automatedBackupEnabled": { + "description": "Whether customer visible automated backups are enabled on the instance.", + "type": "boolean" + }, + "backupRetentionSettings": { + "$ref": "StorageDatabasecenterPartnerapiV1mainRetentionSettings", + "description": "Backup retention settings." + } + }, + "type": "object" + }, + "StorageDatabasecenterPartnerapiV1mainBackupRun": { + "description": "A backup run.", + "id": "StorageDatabasecenterPartnerapiV1mainBackupRun", + "properties": { + "endTime": { + "description": "The time the backup operation completed. REQUIRED", + "format": "google-datetime", + "type": "string" + }, + "error": { + "$ref": "StorageDatabasecenterPartnerapiV1mainOperationError", + "description": "Information about why the backup operation failed. This is only present if the run has the FAILED status. OPTIONAL" + }, + "startTime": { + "description": "The time the backup operation started. REQUIRED", + "format": "google-datetime", + "type": "string" + }, + "status": { + "description": "The status of this run. REQUIRED", + "enum": [ + "STATUS_UNSPECIFIED", + "SUCCESSFUL", + "FAILED" + ], + "enumDescriptions": [ + "", + "The backup was successful.", + "The backup was unsuccessful." + ], + "type": "string" + } + }, + "type": "object" + }, + "StorageDatabasecenterPartnerapiV1mainDatabaseResourceFeed": { + "description": "DatabaseResourceFeed is the top level proto to be used to ingest different database resource level events into Condor platform.", + "id": "StorageDatabasecenterPartnerapiV1mainDatabaseResourceFeed", + "properties": { + "feedTimestamp": { + "description": "Required. Timestamp when feed is generated.", + "format": "google-datetime", + "type": "string" + }, + "feedType": { + "description": "Required. Type feed to be ingested into condor", + "enum": [ + "FEEDTYPE_UNSPECIFIED", + "RESOURCE_METADATA", + "OBSERVABILITY_DATA", + "COMPLIANCE_DATA" + ], + "enumDescriptions": [ + "", + "Database resource metadata feed from control plane", + "Database resource monitoring data", + "Database resource compliance feed" + ], + "type": "string" + }, + "resourceId": { + "$ref": "StorageDatabasecenterPartnerapiV1mainDatabaseResourceId", + "description": "Required. Primary key associated with the Resource" + }, + "resourceMetadata": { + "$ref": "StorageDatabasecenterPartnerapiV1mainDatabaseResourceMetadata", + "description": "More feed data would be added in subsequent CLs" + } + }, + "type": "object" + }, + "StorageDatabasecenterPartnerapiV1mainDatabaseResourceId": { + "description": "DatabaseResourceId will serve as primary key for any resource ingestion event.", + "id": "StorageDatabasecenterPartnerapiV1mainDatabaseResourceId", + "properties": { + "provider": { + "description": "Required. Cloud provider name. Ex: GCP/AWS/Azure/OnPrem/SelfManaged", + "enum": [ + "PROVIDER_UNSPECIFIED", + "GCP", + "AWS", + "AZURE", + "ONPREM", + "SELFMANAGED", + "PROVIDER_OTHER" + ], + "enumDescriptions": [ + "", + "Google cloud platform provider", + "Amazon web service", + "Azure web service", + "On-prem database provider", + "Self-managed database provider", + "For rest of the other category" + ], + "type": "string" + }, + "resourceType": { + "description": "Required. The type of resource this ID is identifying. Ex google.sqladmin.Instance, google.alloydb.cluster, google.sqladmin.Backup REQUIRED", + "type": "string" + }, + "uniqueId": { + "description": "Required. A service-local token that distinguishes this resource from other resources within the same service.", + "type": "string" + } + }, + "type": "object" + }, + "StorageDatabasecenterPartnerapiV1mainDatabaseResourceMetadata": { + "description": "Common model for database resource instance metadata.", + "id": "StorageDatabasecenterPartnerapiV1mainDatabaseResourceMetadata", + "properties": { + "availabilityConfiguration": { + "$ref": "StorageDatabasecenterPartnerapiV1mainAvailabilityConfiguration", + "description": "Availability configuration for this instance" + }, + "backupConfiguration": { + "$ref": "StorageDatabasecenterPartnerapiV1mainBackupConfiguration", + "description": "Backup configuration for this instance" + }, + "backupRun": { + "$ref": "StorageDatabasecenterPartnerapiV1mainBackupRun", + "description": "Latest backup run information for this instance" + }, + "creationTime": { + "description": "The creation time of the resource, i.e. the time when resource is created and recorded in partner service.", + "format": "google-datetime", + "type": "string" + }, + "currentState": { + "description": "Current state of the instance.", + "enum": [ + "STATE_UNSPECIFIED", + "HEALTHY", + "UNHEALTHY", + "STATE_OTHER" + ], + "enumDescriptions": [ + "", + "The instance is running.", + "Instance being created, updated, deleted or under maintenance", + "For rest of the other category" + ], + "type": "string" + }, + "expectedState": { + "description": "The actual instance state.", + "enum": [ + "STATE_UNSPECIFIED", + "HEALTHY", + "UNHEALTHY", + "STATE_OTHER" + ], + "enumDescriptions": [ + "", + "The instance is running.", + "Instance being created, updated, deleted or under maintenance", + "For rest of the other category" + ], + "type": "string" + }, + "id": { + "$ref": "StorageDatabasecenterPartnerapiV1mainDatabaseResourceId", + "description": "Required. Unique identifier for a Database resource" + }, + "instanceType": { + "description": "The type of the instance. Specified at creation time.", + "enum": [ + "INSTANCE_TYPE_UNSPECIFIED", + "PRIMARY", + "READ_REPLICA", + "OTHER" + ], + "enumDescriptions": [ + "", + "A regular primary database instance.", + "An instance acting as a read-replica.", + "For rest of the other categories." + ], + "type": "string" + }, + "location": { + "description": "The resource location. REQUIRED", + "type": "string" + }, + "primaryResourceId": { + "$ref": "StorageDatabasecenterPartnerapiV1mainDatabaseResourceId", + "description": "Unique identifier for this resource's immediate parent resource. This parent resource id would be used to build resource hierarchy in condor platform." + }, + "product": { + "$ref": "StorageDatabasecenterProtoCommonProduct", + "description": "The product this resource represents." + }, + "resourceContainer": { + "description": "Closest parent Cloud Resource Manager container of this resource. It must either be resource name of a Cloud Resource Manager project, for ex: \"projects/123\".", + "type": "string" + }, + "resourceName": { + "description": "Required. Different from unique_id, a resource name can be reused over time. That is after a resource named \"ABC\" is deleted, the name \"ABC\" can be used to to create a new resource within the same source.", + "type": "string" + }, + "updationTime": { + "description": "The time at which the resource was updated and recorded at partner service.", + "format": "google-datetime", + "type": "string" + }, + "userLabels": { + "additionalProperties": { + "type": "string" + }, + "description": "User-provided labels, represented as a dictionary where each label is a single key value pair.", + "type": "object" + } + }, + "type": "object" + }, + "StorageDatabasecenterPartnerapiV1mainOperationError": { + "description": "An error that occurred during a backup creation operation.", + "id": "StorageDatabasecenterPartnerapiV1mainOperationError", + "properties": { + "code": { + "description": "Identifies the specific error that occurred. REQUIRED", + "type": "string" + }, + "message": { + "description": "Additional information about the error encountered. REQUIRED", + "type": "string" + } + }, + "type": "object" + }, + "StorageDatabasecenterPartnerapiV1mainRetentionSettings": { + "id": "StorageDatabasecenterPartnerapiV1mainRetentionSettings", + "properties": { + "quantityBasedRetention": { + "format": "int32", + "type": "integer" + }, + "retentionUnit": { + "description": "The unit that 'retained_backups' represents.", + "enum": [ + "RETENTION_UNIT_UNSPECIFIED", + "COUNT", + "TIME", + "RETENTION_UNIT_OTHER" + ], + "enumDescriptions": [ + "Backup retention unit is unspecified, will be treated as COUNT.", + "Retention will be by count, eg. \"retain the most recent 7 backups\".", + "Retention will be by Time, eg. \"retain the last 7 days backups\".", + "For rest of the other category" + ], + "type": "string" + }, + "timeBasedRetention": { + "format": "google-duration", + "type": "string" + } + }, + "type": "object" + }, + "StorageDatabasecenterProtoCommonProduct": { + "description": "Product specification for Condor resources.", + "id": "StorageDatabasecenterProtoCommonProduct", + "properties": { + "engine": { + "description": "The specific engine that the underlying database is running.", + "enum": [ + "ENGINE_UNSPECIFIED", + "MYSQL", + "POSTGRES", + "SQL_SERVER", + "NATIVE", + "SPANGRES", + "ENGINE_OTHER" + ], + "enumDescriptions": [ + "UNSPECIFIED means engine type is not known or available.", + "MySQL binary running as engine in database instance.", + "Postgres binary running as engine in database instance.", + "SQLServer binary running as engine in database instance.", + "Native database binary running as engine in instance.", + "Cloud Spanner with Postgres dialect.", + "Other refers to rest of other database engine. This is to be when engine is known, but it is not present in this enum." + ], + "type": "string" + }, + "type": { + "description": "Type of specific database product. It could be CloudSQL, AlloyDB etc..", + "enum": [ + "PRODUCT_TYPE_UNSPECIFIED", + "CLOUD_SQL", + "ALLOYDB", + "SPANNER", + "ON_PREM", + "PRODUCT_TYPE_OTHER" + ], + "enumDescriptions": [ + "UNSPECIFIED means product type is not known or available.", + "Cloud SQL product area in GCP", + "AlloyDB product area in GCP", + "Spanner product area in GCP", + "On premises database product.", + "Other refers to rest of other product type. This is to be when product type is known, but it is not present in this enum." + ], + "type": "string" + }, + "version": { + "description": "Version of the underlying database engine. Example values: For MySQL, it could be \"8.0\", \"5.7\" etc.. For Postgres, it could be \"14\", \"15\" etc..", + "type": "string" + } + }, + "type": "object" + }, + "StringRestrictions": { + "description": "Restrictions on STRING type values", + "id": "StringRestrictions", + "properties": { + "allowedValues": { + "description": "The list of allowed values, if bounded. This field will be empty if there is a unbounded number of allowed values.", + "items": { + "type": "string" + }, + "type": "array" + } + }, + "type": "object" + }, + "SupportedDatabaseFlag": { + "description": "SupportedDatabaseFlag gives general information about a database flag, like type and allowed values. This is a static value that is defined on the server side, and it cannot be modified by callers. To set the Database flags on a particular Instance, a caller should modify the Instance.database_flags field.", + "id": "SupportedDatabaseFlag", + "properties": { + "acceptsMultipleValues": { + "description": "Whether the database flag accepts multiple values. If true, a comma-separated list of stringified values may be specified.", + "type": "boolean" + }, + "flagName": { + "description": "The name of the database flag, e.g. \"max_allowed_packets\". The is a possibly key for the Instance.database_flags map field.", + "type": "string" + }, + "integerRestrictions": { + "$ref": "IntegerRestrictions", + "description": "Restriction on INTEGER type value." + }, + "name": { + "description": "The name of the flag resource, following Google Cloud conventions, e.g.: * projects/{project}/locations/{location}/flags/{flag} This field currently has no semantic meaning.", + "type": "string" + }, + "requiresDbRestart": { + "description": "Whether setting or updating this flag on an Instance requires a database restart. If a flag that requires database restart is set, the backend will automatically restart the database (making sure to satisfy any availability SLO's).", + "type": "boolean" + }, + "stringRestrictions": { + "$ref": "StringRestrictions", + "description": "Restriction on STRING type value." + }, + "supportedDbVersions": { + "description": "Major database engine versions for which this flag is supported.", + "items": { + "enum": [ + "DATABASE_VERSION_UNSPECIFIED", + "POSTGRES_13", + "POSTGRES_14" + ], + "enumDeprecated": [ + false, + true, + false + ], + "enumDescriptions": [ + "This is an unknown database version.", + "DEPRECATED - The database version is Postgres 13.", + "The database version is Postgres 14." + ], + "type": "string" + }, + "type": "array" + }, + "valueType": { + "enum": [ + "VALUE_TYPE_UNSPECIFIED", + "STRING", + "INTEGER", + "FLOAT", + "NONE" + ], + "enumDescriptions": [ + "This is an unknown flag type.", + "String type flag.", + "Integer type flag.", + "Float type flag.", + "Denotes that the flag does not accept any values." + ], + "type": "string" + } + }, + "type": "object" + }, + "TimeBasedRetention": { + "description": "A time based retention policy specifies that all backups within a certain time period should be retained.", + "id": "TimeBasedRetention", + "properties": { + "retentionPeriod": { + "description": "The retention period.", + "format": "google-duration", + "type": "string" + } + }, + "type": "object" + }, + "User": { + "description": "Message describing User object.", + "id": "User", + "properties": { + "databaseRoles": { + "description": "Optional. List of database roles this user has. The database role strings are subject to the PostgreSQL naming conventions.", + "items": { + "type": "string" + }, + "type": "array" + }, + "name": { + "description": "Output only. Name of the resource in the form of projects/{project}/locations/{location}/cluster/{cluster}/users/{user}.", + "readOnly": true, + "type": "string" + }, + "password": { + "description": "Input only. Password for the user.", + "type": "string" + }, + "userType": { + "description": "Optional. Type of this user.", + "enum": [ + "USER_TYPE_UNSPECIFIED", + "ALLOYDB_BUILT_IN", + "ALLOYDB_IAM_USER" + ], + "enumDescriptions": [ + "Unspecified user type.", + "The default user type that authenticates via password-based authentication.", + "Database user that can authenticate via IAM-Based authentication." + ], + "type": "string" + } + }, + "type": "object" + }, + "UserPassword": { + "description": "The username/password for a database user. Used for specifying initial users at cluster creation time.", + "id": "UserPassword", + "properties": { + "password": { + "description": "The initial password for the user.", + "type": "string" + }, + "user": { + "description": "The database username.", + "type": "string" + } + }, + "type": "object" + }, + "WeeklySchedule": { + "description": "A weekly schedule starts a backup at prescribed start times within a day, for the specified days of the week. The weekly schedule message is flexible and can be used to create many types of schedules. For example, to have a daily backup that starts at 22:00, configure the `start_times` field to have one element \"22:00\" and the `days_of_week` field to have all seven days of the week.", + "id": "WeeklySchedule", + "properties": { + "daysOfWeek": { + "description": "The days of the week to perform a backup. If this field is left empty, the default of every day of the week is used.", + "items": { + "enum": [ + "DAY_OF_WEEK_UNSPECIFIED", + "MONDAY", + "TUESDAY", + "WEDNESDAY", + "THURSDAY", + "FRIDAY", + "SATURDAY", + "SUNDAY" + ], + "enumDescriptions": [ + "The day of the week is unspecified.", + "Monday", + "Tuesday", + "Wednesday", + "Thursday", + "Friday", + "Saturday", + "Sunday" + ], + "type": "string" + }, + "type": "array" + }, + "startTimes": { + "description": "The times during the day to start a backup. The start times are assumed to be in UTC and to be an exact hour (e.g., 04:00:00). If no start times are provided, a single fixed start time is chosen arbitrarily.", + "items": { + "$ref": "GoogleTypeTimeOfDay" + }, + "type": "array" + } + }, + "type": "object" + } + }, + "servicePath": "", + "title": "AlloyDB API", + "version": "v1", + "version_module": true +} \ No newline at end of file diff --git a/alloydb/v1/alloydb-gen.go b/alloydb/v1/alloydb-gen.go new file mode 100644 index 00000000000..e7084820262 --- /dev/null +++ b/alloydb/v1/alloydb-gen.go @@ -0,0 +1,9268 @@ +// Copyright 2023 Google LLC. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +// Code generated file. DO NOT EDIT. + +// Package alloydb provides access to the AlloyDB API. +// +// For product documentation, see: https://cloud.google.com/alloydb/ +// +// # Library status +// +// These client libraries are officially supported by Google. However, this +// library is considered complete and is in maintenance mode. This means +// that we will address critical bugs and security issues but will not add +// any new features. +// +// When possible, we recommend using our newer +// [Cloud Client Libraries for Go](https://pkg.go.dev/cloud.google.com/go) +// that are still actively being worked and iterated on. +// +// # Creating a client +// +// Usage example: +// +// import "google.golang.org/api/alloydb/v1" +// ... +// ctx := context.Background() +// alloydbService, err := alloydb.NewService(ctx) +// +// In this example, Google Application Default Credentials are used for +// authentication. For information on how to create and obtain Application +// Default Credentials, see https://developers.google.com/identity/protocols/application-default-credentials. +// +// # Other authentication options +// +// To use an API key for authentication (note: some APIs do not support API +// keys), use [google.golang.org/api/option.WithAPIKey]: +// +// alloydbService, err := alloydb.NewService(ctx, option.WithAPIKey("AIza...")) +// +// To use an OAuth token (e.g., a user token obtained via a three-legged OAuth +// flow, use [google.golang.org/api/option.WithTokenSource]: +// +// config := &oauth2.Config{...} +// // ... +// token, err := config.Exchange(ctx, ...) +// alloydbService, err := alloydb.NewService(ctx, option.WithTokenSource(config.TokenSource(ctx, token))) +// +// See [google.golang.org/api/option.ClientOption] for details on options. +package alloydb // import "google.golang.org/api/alloydb/v1" + +import ( + "bytes" + "context" + "encoding/json" + "errors" + "fmt" + "io" + "net/http" + "net/url" + "strconv" + "strings" + + googleapi "google.golang.org/api/googleapi" + internal "google.golang.org/api/internal" + gensupport "google.golang.org/api/internal/gensupport" + option "google.golang.org/api/option" + internaloption "google.golang.org/api/option/internaloption" + htransport "google.golang.org/api/transport/http" +) + +// Always reference these packages, just in case the auto-generated code +// below doesn't. +var _ = bytes.NewBuffer +var _ = strconv.Itoa +var _ = fmt.Sprintf +var _ = json.NewDecoder +var _ = io.Copy +var _ = url.Parse +var _ = gensupport.MarshalJSON +var _ = googleapi.Version +var _ = errors.New +var _ = strings.Replace +var _ = context.Canceled +var _ = internaloption.WithDefaultEndpoint +var _ = internal.Version + +const apiId = "alloydb:v1" +const apiName = "alloydb" +const apiVersion = "v1" +const basePath = "https://alloydb.googleapis.com/" +const mtlsBasePath = "https://alloydb.mtls.googleapis.com/" + +// OAuth2 scopes used by this API. +const ( + // See, edit, configure, and delete your Google Cloud data and see the + // email address for your Google Account. + CloudPlatformScope = "https://www.googleapis.com/auth/cloud-platform" +) + +// NewService creates a new Service. +func NewService(ctx context.Context, opts ...option.ClientOption) (*Service, error) { + scopesOption := internaloption.WithDefaultScopes( + "https://www.googleapis.com/auth/cloud-platform", + ) + // NOTE: prepend, so we don't override user-specified scopes. + opts = append([]option.ClientOption{scopesOption}, opts...) + opts = append(opts, internaloption.WithDefaultEndpoint(basePath)) + opts = append(opts, internaloption.WithDefaultMTLSEndpoint(mtlsBasePath)) + client, endpoint, err := htransport.NewClient(ctx, opts...) + if err != nil { + return nil, err + } + s, err := New(client) + if err != nil { + return nil, err + } + if endpoint != "" { + s.BasePath = endpoint + } + return s, nil +} + +// New creates a new Service. It uses the provided http.Client for requests. +// +// Deprecated: please use NewService instead. +// To provide a custom HTTP client, use option.WithHTTPClient. +// If you are using google.golang.org/api/googleapis/transport.APIKey, use option.WithAPIKey with NewService instead. +func New(client *http.Client) (*Service, error) { + if client == nil { + return nil, errors.New("client is nil") + } + s := &Service{client: client, BasePath: basePath} + s.Projects = NewProjectsService(s) + return s, nil +} + +type Service struct { + client *http.Client + BasePath string // API endpoint base URL + UserAgent string // optional additional User-Agent fragment + + Projects *ProjectsService +} + +func (s *Service) userAgent() string { + if s.UserAgent == "" { + return googleapi.UserAgent + } + return googleapi.UserAgent + " " + s.UserAgent +} + +func NewProjectsService(s *Service) *ProjectsService { + rs := &ProjectsService{s: s} + rs.Locations = NewProjectsLocationsService(s) + return rs +} + +type ProjectsService struct { + s *Service + + Locations *ProjectsLocationsService +} + +func NewProjectsLocationsService(s *Service) *ProjectsLocationsService { + rs := &ProjectsLocationsService{s: s} + rs.Backups = NewProjectsLocationsBackupsService(s) + rs.Clusters = NewProjectsLocationsClustersService(s) + rs.Operations = NewProjectsLocationsOperationsService(s) + rs.SupportedDatabaseFlags = NewProjectsLocationsSupportedDatabaseFlagsService(s) + return rs +} + +type ProjectsLocationsService struct { + s *Service + + Backups *ProjectsLocationsBackupsService + + Clusters *ProjectsLocationsClustersService + + Operations *ProjectsLocationsOperationsService + + SupportedDatabaseFlags *ProjectsLocationsSupportedDatabaseFlagsService +} + +func NewProjectsLocationsBackupsService(s *Service) *ProjectsLocationsBackupsService { + rs := &ProjectsLocationsBackupsService{s: s} + return rs +} + +type ProjectsLocationsBackupsService struct { + s *Service +} + +func NewProjectsLocationsClustersService(s *Service) *ProjectsLocationsClustersService { + rs := &ProjectsLocationsClustersService{s: s} + rs.Instances = NewProjectsLocationsClustersInstancesService(s) + rs.Users = NewProjectsLocationsClustersUsersService(s) + return rs +} + +type ProjectsLocationsClustersService struct { + s *Service + + Instances *ProjectsLocationsClustersInstancesService + + Users *ProjectsLocationsClustersUsersService +} + +func NewProjectsLocationsClustersInstancesService(s *Service) *ProjectsLocationsClustersInstancesService { + rs := &ProjectsLocationsClustersInstancesService{s: s} + return rs +} + +type ProjectsLocationsClustersInstancesService struct { + s *Service +} + +func NewProjectsLocationsClustersUsersService(s *Service) *ProjectsLocationsClustersUsersService { + rs := &ProjectsLocationsClustersUsersService{s: s} + return rs +} + +type ProjectsLocationsClustersUsersService struct { + s *Service +} + +func NewProjectsLocationsOperationsService(s *Service) *ProjectsLocationsOperationsService { + rs := &ProjectsLocationsOperationsService{s: s} + return rs +} + +type ProjectsLocationsOperationsService struct { + s *Service +} + +func NewProjectsLocationsSupportedDatabaseFlagsService(s *Service) *ProjectsLocationsSupportedDatabaseFlagsService { + rs := &ProjectsLocationsSupportedDatabaseFlagsService{s: s} + return rs +} + +type ProjectsLocationsSupportedDatabaseFlagsService struct { + s *Service +} + +// AutomatedBackupPolicy: Message describing the user-specified +// automated backup policy. All fields in the automated backup policy +// are optional. Defaults for each field are provided if they are not +// set. +type AutomatedBackupPolicy struct { + // BackupWindow: The length of the time window during which a backup can + // be taken. If a backup does not succeed within this time window, it + // will be canceled and considered failed. The backup window must be at + // least 5 minutes long. There is no upper bound on the window. If not + // set, it defaults to 1 hour. + BackupWindow string `json:"backupWindow,omitempty"` + + // Enabled: Whether automated automated backups are enabled. If not set, + // defaults to true. + Enabled bool `json:"enabled,omitempty"` + + // EncryptionConfig: Optional. The encryption config can be specified to + // encrypt the backups with a customer-managed encryption key (CMEK). + // When this field is not specified, the backup will then use default + // encryption scheme to protect the user data. + EncryptionConfig *EncryptionConfig `json:"encryptionConfig,omitempty"` + + // Labels: Labels to apply to backups created using this configuration. + Labels map[string]string `json:"labels,omitempty"` + + // Location: The location where the backup will be stored. Currently, + // the only supported option is to store the backup in the same region + // as the cluster. If empty, defaults to the region of the cluster. + Location string `json:"location,omitempty"` + + // QuantityBasedRetention: Quantity-based Backup retention policy to + // retain recent backups. + QuantityBasedRetention *QuantityBasedRetention `json:"quantityBasedRetention,omitempty"` + + // TimeBasedRetention: Time-based Backup retention policy. + TimeBasedRetention *TimeBasedRetention `json:"timeBasedRetention,omitempty"` + + // WeeklySchedule: Weekly schedule for the Backup. + WeeklySchedule *WeeklySchedule `json:"weeklySchedule,omitempty"` + + // ForceSendFields is a list of field names (e.g. "BackupWindow") 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. "BackupWindow") 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 *AutomatedBackupPolicy) MarshalJSON() ([]byte, error) { + type NoMethod AutomatedBackupPolicy + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// Backup: Message describing Backup object +type Backup struct { + // Annotations: Annotations to allow client tools to store small amount + // of arbitrary data. This is distinct from labels. + // https://google.aip.dev/128 + Annotations map[string]string `json:"annotations,omitempty"` + + // ClusterName: Required. The full resource name of the backup source + // cluster (e.g., + // projects/{project}/locations/{region}/clusters/{cluster_id}). + ClusterName string `json:"clusterName,omitempty"` + + // ClusterUid: Output only. The system-generated UID of the cluster + // which was used to create this resource. + ClusterUid string `json:"clusterUid,omitempty"` + + // CreateTime: Output only. Create time stamp + CreateTime string `json:"createTime,omitempty"` + + // DatabaseVersion: Output only. The database engine major version of + // the cluster this backup was created from. Any restored cluster + // created from this backup will have the same database version. + // + // Possible values: + // "DATABASE_VERSION_UNSPECIFIED" - This is an unknown database + // version. + // "POSTGRES_13" - DEPRECATED - The database version is Postgres 13. + // "POSTGRES_14" - The database version is Postgres 14. + DatabaseVersion string `json:"databaseVersion,omitempty"` + + // DeleteTime: Output only. Delete time stamp + DeleteTime string `json:"deleteTime,omitempty"` + + // Description: User-provided description of the backup. + Description string `json:"description,omitempty"` + + // DisplayName: User-settable and human-readable display name for the + // Backup. + DisplayName string `json:"displayName,omitempty"` + + // EncryptionConfig: Optional. The encryption config can be specified to + // encrypt the backup with a customer-managed encryption key (CMEK). + // When this field is not specified, the backup will then use default + // encryption scheme to protect the user data. + EncryptionConfig *EncryptionConfig `json:"encryptionConfig,omitempty"` + + // EncryptionInfo: Output only. The encryption information for the + // backup. + EncryptionInfo *EncryptionInfo `json:"encryptionInfo,omitempty"` + + // Etag: For Resource freshness validation (https://google.aip.dev/154) + Etag string `json:"etag,omitempty"` + + // ExpiryQuantity: Output only. The QuantityBasedExpiry of the backup, + // specified by the backup's retention policy. Once the expiry quantity + // is over retention, the backup is eligible to be garbage collected. + ExpiryQuantity *QuantityBasedExpiry `json:"expiryQuantity,omitempty"` + + // ExpiryTime: Output only. The time at which after the backup is + // eligible to be garbage collected. It is the duration specified by the + // backup's retention policy, added to the backup's create_time. + ExpiryTime string `json:"expiryTime,omitempty"` + + // Labels: Labels as key value pairs + Labels map[string]string `json:"labels,omitempty"` + + // Name: Output only. The name of the backup resource with the format: * + // projects/{project}/locations/{region}/backups/{backup_id} where the + // cluster and backup ID segments should satisfy the regex expression + // `[a-z]([a-z0-9-]{0,61}[a-z0-9])?`, e.g. 1-63 characters of lowercase + // letters, numbers, and dashes, starting with a letter, and ending with + // a letter or number. For more details see https://google.aip.dev/122. + // The prefix of the backup resource name is the name of the parent + // resource: * projects/{project}/locations/{region} + Name string `json:"name,omitempty"` + + // Reconciling: Output only. Reconciling + // (https://google.aip.dev/128#reconciliation), if true, indicates that + // the service is actively updating the resource. This can happen due to + // user-triggered updates or system actions like failover or + // maintenance. + Reconciling bool `json:"reconciling,omitempty"` + + // SizeBytes: Output only. The size of the backup in bytes. + SizeBytes int64 `json:"sizeBytes,omitempty,string"` + + // State: Output only. The current state of the backup. + // + // Possible values: + // "STATE_UNSPECIFIED" - The state of the backup is unknown. + // "READY" - The backup is ready. + // "CREATING" - The backup is creating. + // "FAILED" - The backup failed. + // "DELETING" - The backup is being deleted. + State string `json:"state,omitempty"` + + // Type: The backup type, which suggests the trigger for the backup. + // + // Possible values: + // "TYPE_UNSPECIFIED" - Backup Type is unknown. + // "ON_DEMAND" - ON_DEMAND backups that were triggered by the customer + // (e.g., not AUTOMATED). + // "AUTOMATED" - AUTOMATED backups triggered by the automated backups + // scheduler pursuant to an automated backup policy. + // "CONTINUOUS" - CONTINUOUS backups triggered by the automated + // backups scheduler due to a continuous backup policy. + Type string `json:"type,omitempty"` + + // Uid: Output only. The system-generated UID of the resource. The UID + // is assigned when the resource is created, and it is retained until it + // is deleted. + Uid string `json:"uid,omitempty"` + + // UpdateTime: Output only. Update time stamp + UpdateTime string `json:"updateTime,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the + // server. + googleapi.ServerResponse `json:"-"` + + // ForceSendFields is a list of field names (e.g. "Annotations") 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. "Annotations") 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 *Backup) MarshalJSON() ([]byte, error) { + type NoMethod Backup + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// BackupSource: Message describing a BackupSource. +type BackupSource struct { + // BackupName: Required. The name of the backup resource with the + // format: * projects/{project}/locations/{region}/backups/{backup_id} + BackupName string `json:"backupName,omitempty"` + + // BackupUid: Output only. The system-generated UID of the backup which + // was used to create this resource. The UID is generated when the + // backup is created, and it is retained until the backup is deleted. + BackupUid string `json:"backupUid,omitempty"` + + // ForceSendFields is a list of field names (e.g. "BackupName") 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. "BackupName") 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 *BackupSource) MarshalJSON() ([]byte, error) { + type NoMethod BackupSource + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// CancelOperationRequest: The request message for +// Operations.CancelOperation. +type CancelOperationRequest struct { +} + +// ClientConnectionConfig: Client connection configuration +type ClientConnectionConfig struct { + // RequireConnectors: Optional. Configuration to enforce connectors only + // (ex: AuthProxy) connections to the database. + RequireConnectors bool `json:"requireConnectors,omitempty"` + + // SslConfig: Optional. SSL config option for this instance. + SslConfig *SslConfig `json:"sslConfig,omitempty"` + + // ForceSendFields is a list of field names (e.g. "RequireConnectors") + // 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. "RequireConnectors") 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 *ClientConnectionConfig) MarshalJSON() ([]byte, error) { + type NoMethod ClientConnectionConfig + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// CloudControl2SharedOperationsReconciliationOperationMetadata: +// Operation metadata returned by the CLH during resource state +// reconciliation. +type CloudControl2SharedOperationsReconciliationOperationMetadata struct { + // DeleteResource: DEPRECATED. Use exclusive_action instead. + DeleteResource bool `json:"deleteResource,omitempty"` + + // ExclusiveAction: Excluisive action returned by the CLH. + // + // Possible values: + // "UNKNOWN_REPAIR_ACTION" - Unknown repair action. + // "DELETE" - The resource has to be deleted. When using this bit, the + // CLH should fail the operation. DEPRECATED. Instead use + // DELETE_RESOURCE OperationSignal in SideChannel. + // "RETRY" - This resource could not be repaired but the repair should + // be tried again at a later time. This can happen if there is a + // dependency that needs to be resolved first- e.g. if a parent resource + // must be repaired before a child resource. + ExclusiveAction string `json:"exclusiveAction,omitempty"` + + // ForceSendFields is a list of field names (e.g. "DeleteResource") 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. "DeleteResource") 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 *CloudControl2SharedOperationsReconciliationOperationMetadata) MarshalJSON() ([]byte, error) { + type NoMethod CloudControl2SharedOperationsReconciliationOperationMetadata + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// Cluster: A cluster is a collection of regional AlloyDB resources. It +// can include a primary instance and one or more read pool instances. +// All cluster resources share a storage layer, which scales as needed. +type Cluster struct { + // Annotations: Annotations to allow client tools to store small amount + // of arbitrary data. This is distinct from labels. + // https://google.aip.dev/128 + Annotations map[string]string `json:"annotations,omitempty"` + + // AutomatedBackupPolicy: The automated backup policy for this cluster. + // If no policy is provided then the default policy will be used. If + // backups are supported for the cluster, the default policy takes one + // backup a day, has a backup window of 1 hour, and retains backups for + // 14 days. For more information on the defaults, consult the + // documentation for the message type. + AutomatedBackupPolicy *AutomatedBackupPolicy `json:"automatedBackupPolicy,omitempty"` + + // BackupSource: Output only. Cluster created from backup. + BackupSource *BackupSource `json:"backupSource,omitempty"` + + // ClusterType: Output only. The type of the cluster. This is an + // output-only field and it's populated at the Cluster creation time or + // the Cluster promotion time. The cluster type is determined by which + // RPC was used to create the cluster (i.e. `CreateCluster` vs. + // `CreateSecondaryCluster` + // + // Possible values: + // "CLUSTER_TYPE_UNSPECIFIED" - The type of the cluster is unknown. + // "PRIMARY" - Primary cluster that support read and write operations. + // "SECONDARY" - Secondary cluster that is replicating from another + // region. This only supports read. + ClusterType string `json:"clusterType,omitempty"` + + // ContinuousBackupConfig: Optional. Continuous backup configuration for + // this cluster. + ContinuousBackupConfig *ContinuousBackupConfig `json:"continuousBackupConfig,omitempty"` + + // ContinuousBackupInfo: Output only. Continuous backup properties for + // this cluster. + ContinuousBackupInfo *ContinuousBackupInfo `json:"continuousBackupInfo,omitempty"` + + // CreateTime: Output only. Create time stamp + CreateTime string `json:"createTime,omitempty"` + + // DatabaseVersion: Optional. The database engine major version. This is + // an optional field and it is populated at the Cluster creation time. + // If a database version is not supplied at cluster creation time, then + // a default database version will be used. + // + // Possible values: + // "DATABASE_VERSION_UNSPECIFIED" - This is an unknown database + // version. + // "POSTGRES_13" - DEPRECATED - The database version is Postgres 13. + // "POSTGRES_14" - The database version is Postgres 14. + DatabaseVersion string `json:"databaseVersion,omitempty"` + + // DeleteTime: Output only. Delete time stamp + DeleteTime string `json:"deleteTime,omitempty"` + + // DisplayName: User-settable and human-readable display name for the + // Cluster. + DisplayName string `json:"displayName,omitempty"` + + // EncryptionConfig: Optional. The encryption config can be specified to + // encrypt the data disks and other persistent data resources of a + // cluster with a customer-managed encryption key (CMEK). When this + // field is not specified, the cluster will then use default encryption + // scheme to protect the user data. + EncryptionConfig *EncryptionConfig `json:"encryptionConfig,omitempty"` + + // EncryptionInfo: Output only. The encryption information for the + // cluster. + EncryptionInfo *EncryptionInfo `json:"encryptionInfo,omitempty"` + + // Etag: For Resource freshness validation (https://google.aip.dev/154) + Etag string `json:"etag,omitempty"` + + // InitialUser: Input only. Initial user to setup during cluster + // creation. Required. If used in `RestoreCluster` this is ignored. + InitialUser *UserPassword `json:"initialUser,omitempty"` + + // Labels: Labels as key value pairs + Labels map[string]string `json:"labels,omitempty"` + + // MigrationSource: Output only. Cluster created via DMS migration. + MigrationSource *MigrationSource `json:"migrationSource,omitempty"` + + // Name: Output only. The name of the cluster resource with the format: + // * projects/{project}/locations/{region}/clusters/{cluster_id} where + // the cluster ID segment should satisfy the regex expression + // `[a-z0-9-]+`. For more details see https://google.aip.dev/122. The + // prefix of the cluster resource name is the name of the parent + // resource: * projects/{project}/locations/{region} + Name string `json:"name,omitempty"` + + // Network: Required. The resource link for the VPC network in which + // cluster resources are created and from which they are accessible via + // Private IP. The network must belong to the same project as the + // cluster. It is specified in the form: + // "projects/{project}/global/networks/{network_id}". This is required + // to create a cluster. It can be updated, but it cannot be removed. + // Deprecated, use network_config.network instead. + Network string `json:"network,omitempty"` + + NetworkConfig *NetworkConfig `json:"networkConfig,omitempty"` + + // PrimaryConfig: Output only. Cross Region replication config specific + // to PRIMARY cluster. + PrimaryConfig *PrimaryConfig `json:"primaryConfig,omitempty"` + + // Reconciling: Output only. Reconciling + // (https://google.aip.dev/128#reconciliation). Set to true if the + // current state of Cluster does not match the user's intended state, + // and the service is actively updating the resource to reconcile them. + // This can happen due to user-triggered updates or system actions like + // failover or maintenance. + Reconciling bool `json:"reconciling,omitempty"` + + // SecondaryConfig: Cross Region replication config specific to + // SECONDARY cluster. + SecondaryConfig *SecondaryConfig `json:"secondaryConfig,omitempty"` + + // SslConfig: SSL configuration for this AlloyDB cluster. + SslConfig *SslConfig `json:"sslConfig,omitempty"` + + // State: Output only. The current serving state of the cluster. + // + // Possible values: + // "STATE_UNSPECIFIED" - The state of the cluster is unknown. + // "READY" - The cluster is active and running. + // "STOPPED" - The cluster is stopped. All instances in the cluster + // are stopped. Customers can start a stopped cluster at any point and + // all their instances will come back to life with same names and IP + // resources. In this state, customer pays for storage. Associated + // backups could also be present in a stopped cluster. + // "EMPTY" - The cluster is empty and has no associated resources. All + // instances, associated storage and backups have been deleted. + // "CREATING" - The cluster is being created. + // "DELETING" - The cluster is being deleted. + // "FAILED" - The creation of the cluster failed. + // "BOOTSTRAPPING" - The cluster is bootstrapping with data from some + // other source. Direct mutations to the cluster (e.g. adding read pool) + // are not allowed. + // "MAINTENANCE" - The cluster is under maintenance. AlloyDB regularly + // performs maintenance and upgrades on customer clusters. Updates on + // the cluster are not allowed while the cluster is in this state. + // "PROMOTING" - The cluster is being promoted. + State string `json:"state,omitempty"` + + // Uid: Output only. The system-generated UID of the resource. The UID + // is assigned when the resource is created, and it is retained until it + // is deleted. + Uid string `json:"uid,omitempty"` + + // UpdateTime: Output only. Update time stamp + UpdateTime string `json:"updateTime,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the + // server. + googleapi.ServerResponse `json:"-"` + + // ForceSendFields is a list of field names (e.g. "Annotations") 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. "Annotations") 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 *Cluster) MarshalJSON() ([]byte, error) { + type NoMethod Cluster + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// ContinuousBackupConfig: ContinuousBackupConfig describes the +// continuous backups recovery configurations of a cluster. +type ContinuousBackupConfig struct { + // Enabled: Whether ContinuousBackup is enabled. + Enabled bool `json:"enabled,omitempty"` + + // EncryptionConfig: The encryption config can be specified to encrypt + // the backups with a customer-managed encryption key (CMEK). When this + // field is not specified, the backup will then use default encryption + // scheme to protect the user data. + EncryptionConfig *EncryptionConfig `json:"encryptionConfig,omitempty"` + + // RecoveryWindowDays: The number of days that are eligible to restore + // from using PITR. To support the entire recovery window, backups and + // logs are retained for one day more than the recovery window. If not + // set, defaults to 14 days. + RecoveryWindowDays int64 `json:"recoveryWindowDays,omitempty"` + + // 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. "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:"-"` +} + +func (s *ContinuousBackupConfig) MarshalJSON() ([]byte, error) { + type NoMethod ContinuousBackupConfig + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// ContinuousBackupInfo: ContinuousBackupInfo describes the continuous +// backup properties of a cluster. +type ContinuousBackupInfo struct { + // EarliestRestorableTime: Output only. The earliest restorable time + // that can be restored to. Output only field. + EarliestRestorableTime string `json:"earliestRestorableTime,omitempty"` + + // EnabledTime: Output only. When ContinuousBackup was most recently + // enabled. Set to null if ContinuousBackup is not enabled. + EnabledTime string `json:"enabledTime,omitempty"` + + // EncryptionInfo: Output only. The encryption information for the WALs + // and backups required for ContinuousBackup. + EncryptionInfo *EncryptionInfo `json:"encryptionInfo,omitempty"` + + // Schedule: Output only. Days of the week on which a continuous backup + // is taken. Output only field. Ignored if passed into the request. + // + // Possible values: + // "DAY_OF_WEEK_UNSPECIFIED" - The day of the week is unspecified. + // "MONDAY" - Monday + // "TUESDAY" - Tuesday + // "WEDNESDAY" - Wednesday + // "THURSDAY" - Thursday + // "FRIDAY" - Friday + // "SATURDAY" - Saturday + // "SUNDAY" - Sunday + Schedule []string `json:"schedule,omitempty"` + + // ForceSendFields is a list of field names (e.g. + // "EarliestRestorableTime") 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. "EarliestRestorableTime") + // 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 *ContinuousBackupInfo) MarshalJSON() ([]byte, error) { + type NoMethod ContinuousBackupInfo + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// ContinuousBackupSource: Message describing a ContinuousBackupSource. +type ContinuousBackupSource struct { + // Cluster: Required. The source cluster from which to restore. This + // cluster must have continuous backup enabled for this operation to + // succeed. For the required format, see the comment on the Cluster.name + // field. + Cluster string `json:"cluster,omitempty"` + + // PointInTime: Required. The point in time to restore to. + PointInTime string `json:"pointInTime,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Cluster") 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. "Cluster") 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 *ContinuousBackupSource) MarshalJSON() ([]byte, error) { + type NoMethod ContinuousBackupSource + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// Empty: A generic empty message that you can re-use to avoid defining +// duplicated empty messages in your APIs. A typical example is to use +// it as the request or the response type of an API method. For +// instance: service Foo { rpc Bar(google.protobuf.Empty) returns +// (google.protobuf.Empty); } +type Empty struct { + // ServerResponse contains the HTTP response code and headers from the + // server. + googleapi.ServerResponse `json:"-"` +} + +// EncryptionConfig: EncryptionConfig describes the encryption config of +// a cluster or a backup that is encrypted with a CMEK (customer-managed +// encryption key). +type EncryptionConfig struct { + // KmsKeyName: The fully-qualified resource name of the KMS key. Each + // Cloud KMS key is regionalized and has the following format: + // projects/[PROJECT]/locations/[REGION]/keyRings/[RING]/cryptoKeys/[KEY_ + // NAME] + KmsKeyName string `json:"kmsKeyName,omitempty"` + + // ForceSendFields is a list of field names (e.g. "KmsKeyName") 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. "KmsKeyName") 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 *EncryptionConfig) MarshalJSON() ([]byte, error) { + type NoMethod EncryptionConfig + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// EncryptionInfo: EncryptionInfo describes the encryption information +// of a cluster or a backup. +type EncryptionInfo struct { + // EncryptionType: Output only. Type of encryption. + // + // Possible values: + // "TYPE_UNSPECIFIED" - Encryption type not specified. Defaults to + // GOOGLE_DEFAULT_ENCRYPTION. + // "GOOGLE_DEFAULT_ENCRYPTION" - The data is encrypted at rest with a + // key that is fully managed by Google. No key version will be + // populated. This is the default state. + // "CUSTOMER_MANAGED_ENCRYPTION" - The data is encrypted at rest with + // a key that is managed by the customer. KMS key versions will be + // populated. + EncryptionType string `json:"encryptionType,omitempty"` + + // KmsKeyVersions: Output only. Cloud KMS key versions that are being + // used to protect the database or the backup. + KmsKeyVersions []string `json:"kmsKeyVersions,omitempty"` + + // ForceSendFields is a list of field names (e.g. "EncryptionType") 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. "EncryptionType") 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 *EncryptionInfo) MarshalJSON() ([]byte, error) { + type NoMethod EncryptionInfo + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// FailoverInstanceRequest: Message for triggering failover on an +// Instance +type FailoverInstanceRequest struct { + // RequestId: Optional. An optional request ID to identify requests. + // Specify a unique request ID so that if you must retry your request, + // the server will know to ignore the request if it has already been + // completed. The server will guarantee that for at least 60 minutes + // after the first request. For example, consider a situation where you + // make an initial request and the request times out. If you make the + // request again with the same request ID, the server can check if + // original operation with the same request ID was received, and if so, + // will ignore the second request. This prevents clients from + // accidentally creating duplicate commitments. The request ID must be a + // valid UUID with the exception that zero UUID is not supported + // (00000000-0000-0000-0000-000000000000). + RequestId string `json:"requestId,omitempty"` + + // ValidateOnly: Optional. If set, performs request validation (e.g. + // permission checks and any other type of validation), but do not + // actually execute the failover. + ValidateOnly bool `json:"validateOnly,omitempty"` + + // ForceSendFields is a list of field names (e.g. "RequestId") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "RequestId") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *FailoverInstanceRequest) MarshalJSON() ([]byte, error) { + type NoMethod FailoverInstanceRequest + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// GoogleCloudLocationListLocationsResponse: The response message for +// Locations.ListLocations. +type GoogleCloudLocationListLocationsResponse struct { + // Locations: A list of locations that matches the specified filter in + // the request. + Locations []*GoogleCloudLocationLocation `json:"locations,omitempty"` + + // NextPageToken: The standard List next-page token. + NextPageToken string `json:"nextPageToken,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the + // server. + googleapi.ServerResponse `json:"-"` + + // ForceSendFields is a list of field names (e.g. "Locations") 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. "Locations") 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 *GoogleCloudLocationListLocationsResponse) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudLocationListLocationsResponse + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// GoogleCloudLocationLocation: A resource that represents a Google +// Cloud location. +type GoogleCloudLocationLocation struct { + // DisplayName: The friendly name for this location, typically a nearby + // city name. For example, "Tokyo". + DisplayName string `json:"displayName,omitempty"` + + // Labels: Cross-service attributes for the location. For example + // {"cloud.googleapis.com/region": "us-east1"} + Labels map[string]string `json:"labels,omitempty"` + + // LocationId: The canonical id for this location. For example: + // "us-east1". + LocationId string `json:"locationId,omitempty"` + + // Metadata: Service-specific metadata. For example the available + // capacity at the given location. + Metadata googleapi.RawMessage `json:"metadata,omitempty"` + + // Name: Resource name for the location, which may vary between + // implementations. For example: + // "projects/example-project/locations/us-east1" + Name string `json:"name,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the + // server. + googleapi.ServerResponse `json:"-"` + + // ForceSendFields is a list of field names (e.g. "DisplayName") 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. "DisplayName") 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 *GoogleCloudLocationLocation) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudLocationLocation + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// GoogleTypeTimeOfDay: Represents a time of day. The date and time zone +// are either not significant or are specified elsewhere. An API may +// choose to allow leap seconds. Related types are google.type.Date and +// `google.protobuf.Timestamp`. +type GoogleTypeTimeOfDay struct { + // Hours: Hours of day in 24 hour format. Should be from 0 to 23. An API + // may choose to allow the value "24:00:00" for scenarios like business + // closing time. + Hours int64 `json:"hours,omitempty"` + + // Minutes: Minutes of hour of day. Must be from 0 to 59. + Minutes int64 `json:"minutes,omitempty"` + + // Nanos: Fractions of seconds in nanoseconds. Must be from 0 to + // 999,999,999. + Nanos int64 `json:"nanos,omitempty"` + + // Seconds: Seconds of minutes of the time. Must normally be from 0 to + // 59. An API may allow the value 60 if it allows leap-seconds. + Seconds int64 `json:"seconds,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Hours") 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. "Hours") 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 *GoogleTypeTimeOfDay) MarshalJSON() ([]byte, error) { + type NoMethod GoogleTypeTimeOfDay + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// InjectFaultRequest: Message for triggering fault injection on an +// instance +type InjectFaultRequest struct { + // FaultType: Required. The type of fault to be injected in an instance. + // + // Possible values: + // "FAULT_TYPE_UNSPECIFIED" - The fault type is unknown. + // "STOP_VM" - Stop the VM + FaultType string `json:"faultType,omitempty"` + + // RequestId: Optional. An optional request ID to identify requests. + // Specify a unique request ID so that if you must retry your request, + // the server will know to ignore the request if it has already been + // completed. The server will guarantee that for at least 60 minutes + // after the first request. For example, consider a situation where you + // make an initial request and the request times out. If you make the + // request again with the same request ID, the server can check if + // original operation with the same request ID was received, and if so, + // will ignore the second request. This prevents clients from + // accidentally creating duplicate commitments. The request ID must be a + // valid UUID with the exception that zero UUID is not supported + // (00000000-0000-0000-0000-000000000000). + RequestId string `json:"requestId,omitempty"` + + // ValidateOnly: Optional. If set, performs request validation (e.g. + // permission checks and any other type of validation), but do not + // actually execute the fault injection. + ValidateOnly bool `json:"validateOnly,omitempty"` + + // ForceSendFields is a list of field names (e.g. "FaultType") 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. "FaultType") 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 *InjectFaultRequest) MarshalJSON() ([]byte, error) { + type NoMethod InjectFaultRequest + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// Instance: An Instance is a computing unit that an end customer can +// connect to. It's the main unit of computing resources in AlloyDB. +type Instance struct { + // Annotations: Annotations to allow client tools to store small amount + // of arbitrary data. This is distinct from labels. + // https://google.aip.dev/128 + Annotations map[string]string `json:"annotations,omitempty"` + + // AvailabilityType: Availability type of an Instance. If empty, + // defaults to REGIONAL for primary instances. For read pools, + // availability_type is always UNSPECIFIED. Instances in the read pools + // are evenly distributed across available zones within the region (i.e. + // read pools with more than one node will have a node in at least two + // zones). + // + // Possible values: + // "AVAILABILITY_TYPE_UNSPECIFIED" - This is an unknown Availability + // type. + // "ZONAL" - Zonal available instance. + // "REGIONAL" - Regional (or Highly) available instance. + AvailabilityType string `json:"availabilityType,omitempty"` + + // ClientConnectionConfig: Optional. Client connection specific + // configurations + ClientConnectionConfig *ClientConnectionConfig `json:"clientConnectionConfig,omitempty"` + + // CreateTime: Output only. Create time stamp + CreateTime string `json:"createTime,omitempty"` + + // DatabaseFlags: Database flags. Set at instance level. * They are + // copied from primary instance on read instance creation. * Read + // instances can set new or override existing flags that are relevant + // for reads, e.g. for enabling columnar cache on a read instance. Flags + // set on read instance may or may not be present on primary. This is a + // list of "key": "value" pairs. "key": The name of the flag. These + // flags are passed at instance setup time, so include both server + // options and system variables for Postgres. Flags are specified with + // underscores, not hyphens. "value": The value of the flag. Booleans + // are set to **on** for true and **off** for false. This field must be + // omitted if the flag doesn't take a value. + DatabaseFlags map[string]string `json:"databaseFlags,omitempty"` + + // DeleteTime: Output only. Delete time stamp + DeleteTime string `json:"deleteTime,omitempty"` + + // DisplayName: User-settable and human-readable display name for the + // Instance. + DisplayName string `json:"displayName,omitempty"` + + // Etag: For Resource freshness validation (https://google.aip.dev/154) + Etag string `json:"etag,omitempty"` + + // GceZone: The Compute Engine zone that the instance should serve from, + // per https://cloud.google.com/compute/docs/regions-zones This can ONLY + // be specified for ZONAL instances. If present for a REGIONAL instance, + // an error will be thrown. If this is absent for a ZONAL instance, + // instance is created in a random zone with available capacity. + GceZone string `json:"gceZone,omitempty"` + + // InstanceType: Required. The type of the instance. Specified at + // creation time. + // + // Possible values: + // "INSTANCE_TYPE_UNSPECIFIED" - The type of the instance is unknown. + // "PRIMARY" - PRIMARY instances support read and write operations. + // "READ_POOL" - READ POOL instances support read operations only. + // Each read pool instance consists of one or more homogeneous nodes. * + // Read pool of size 1 can only have zonal availability. * Read pools + // with node count of 2 or more can have regional availability (nodes + // are present in 2 or more zones in a region). + // "SECONDARY" - SECONDARY instances support read operations only. + // SECONDARY instance is a cross-region read replica + InstanceType string `json:"instanceType,omitempty"` + + // IpAddress: Output only. The IP address for the Instance. This is the + // connection endpoint for an end-user application. + IpAddress string `json:"ipAddress,omitempty"` + + // Labels: Labels as key value pairs + Labels map[string]string `json:"labels,omitempty"` + + // MachineConfig: Configurations for the machines that host the + // underlying database engine. + MachineConfig *MachineConfig `json:"machineConfig,omitempty"` + + // Name: Output only. The name of the instance resource with the format: + // * + // projects/{project}/locations/{region}/clusters/{cluster_id}/instances/ + // {instance_id} where the cluster and instance ID segments should + // satisfy the regex expression `[a-z]([a-z0-9-]{0,61}[a-z0-9])?`, e.g. + // 1-63 characters of lowercase letters, numbers, and dashes, starting + // with a letter, and ending with a letter or number. For more details + // see https://google.aip.dev/122. The prefix of the instance resource + // name is the name of the parent resource: * + // projects/{project}/locations/{region}/clusters/{cluster_id} + Name string `json:"name,omitempty"` + + // Nodes: Output only. List of available read-only VMs in this instance, + // including the standby for a PRIMARY instance. + Nodes []*Node `json:"nodes,omitempty"` + + // QueryInsightsConfig: Configuration for query insights. + QueryInsightsConfig *QueryInsightsInstanceConfig `json:"queryInsightsConfig,omitempty"` + + // ReadPoolConfig: Read pool specific config. + ReadPoolConfig *ReadPoolConfig `json:"readPoolConfig,omitempty"` + + // Reconciling: Output only. Reconciling + // (https://google.aip.dev/128#reconciliation). Set to true if the + // current state of Instance does not match the user's intended state, + // and the service is actively updating the resource to reconcile them. + // This can happen due to user-triggered updates or system actions like + // failover or maintenance. + Reconciling bool `json:"reconciling,omitempty"` + + // State: Output only. The current serving state of the instance. + // + // Possible values: + // "STATE_UNSPECIFIED" - The state of the instance is unknown. + // "READY" - The instance is active and running. + // "STOPPED" - The instance is stopped. Instance name and IP resources + // are preserved. + // "CREATING" - The instance is being created. + // "DELETING" - The instance is being deleted. + // "MAINTENANCE" - The instance is down for maintenance. + // "FAILED" - The creation of the instance failed or a fatal error + // occurred during an operation on the instance. Note: Instances in this + // state would tried to be auto-repaired. And Customers should be able + // to restart, update or delete these instances. + // "BOOTSTRAPPING" - Index 7 is used in the producer apis for + // ROLLED_BACK state. Keeping that index unused in case that state also + // needs to exposed via consumer apis in future. The instance has been + // configured to sync data from some other source. + // "PROMOTING" - The instance is being promoted. + State string `json:"state,omitempty"` + + // Uid: Output only. The system-generated UID of the resource. The UID + // is assigned when the resource is created, and it is retained until it + // is deleted. + Uid string `json:"uid,omitempty"` + + // UpdateTime: Output only. Update time stamp + UpdateTime string `json:"updateTime,omitempty"` + + // WritableNode: Output only. This is set for the read-write VM of the + // PRIMARY instance only. + WritableNode *Node `json:"writableNode,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the + // server. + googleapi.ServerResponse `json:"-"` + + // ForceSendFields is a list of field names (e.g. "Annotations") 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. "Annotations") 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 *Instance) MarshalJSON() ([]byte, error) { + type NoMethod Instance + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// IntegerRestrictions: Restrictions on INTEGER type values. +type IntegerRestrictions struct { + // MaxValue: The maximum value that can be specified, if applicable. + MaxValue int64 `json:"maxValue,omitempty,string"` + + // MinValue: The minimum value that can be specified, if applicable. + MinValue int64 `json:"minValue,omitempty,string"` + + // ForceSendFields is a list of field names (e.g. "MaxValue") 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. "MaxValue") 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 *IntegerRestrictions) MarshalJSON() ([]byte, error) { + type NoMethod IntegerRestrictions + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// ListBackupsResponse: Message for response to listing Backups +type ListBackupsResponse struct { + // Backups: The list of Backup + Backups []*Backup `json:"backups,omitempty"` + + // NextPageToken: A token identifying a page of results the server + // should return. + NextPageToken string `json:"nextPageToken,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. "Backups") 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. "Backups") 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 *ListBackupsResponse) MarshalJSON() ([]byte, error) { + type NoMethod ListBackupsResponse + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// ListClustersResponse: Message for response to listing Clusters +type ListClustersResponse struct { + // Clusters: The list of Cluster + Clusters []*Cluster `json:"clusters,omitempty"` + + // NextPageToken: A token identifying a page of results the server + // should return. + NextPageToken string `json:"nextPageToken,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. "Clusters") 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. "Clusters") 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 *ListClustersResponse) MarshalJSON() ([]byte, error) { + type NoMethod ListClustersResponse + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// ListInstancesResponse: Message for response to listing Instances +type ListInstancesResponse struct { + // Instances: The list of Instance + Instances []*Instance `json:"instances,omitempty"` + + // NextPageToken: A token identifying a page of results the server + // should return. + NextPageToken string `json:"nextPageToken,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. "Instances") 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. "Instances") 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 *ListInstancesResponse) MarshalJSON() ([]byte, error) { + type NoMethod ListInstancesResponse + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// ListOperationsResponse: The response message for +// Operations.ListOperations. +type ListOperationsResponse struct { + // NextPageToken: The standard List next-page token. + NextPageToken string `json:"nextPageToken,omitempty"` + + // Operations: A list of operations that matches the specified filter in + // the request. + Operations []*Operation `json:"operations,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 *ListOperationsResponse) MarshalJSON() ([]byte, error) { + type NoMethod ListOperationsResponse + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// ListSupportedDatabaseFlagsResponse: Message for response to listing +// SupportedDatabaseFlags. +type ListSupportedDatabaseFlagsResponse struct { + // NextPageToken: A token identifying a page of results the server + // should return. + NextPageToken string `json:"nextPageToken,omitempty"` + + // SupportedDatabaseFlags: The list of SupportedDatabaseFlags. + SupportedDatabaseFlags []*SupportedDatabaseFlag `json:"supportedDatabaseFlags,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 *ListSupportedDatabaseFlagsResponse) MarshalJSON() ([]byte, error) { + type NoMethod ListSupportedDatabaseFlagsResponse + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// ListUsersResponse: Message for response to listing Users +type ListUsersResponse struct { + // NextPageToken: A token identifying a page of results the server + // should return. + NextPageToken string `json:"nextPageToken,omitempty"` + + // Unreachable: Locations that could not be reached. + Unreachable []string `json:"unreachable,omitempty"` + + // Users: The list of User + Users []*User `json:"users,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 *ListUsersResponse) MarshalJSON() ([]byte, error) { + type NoMethod ListUsersResponse + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// MachineConfig: MachineConfig describes the configuration of a +// machine. +type MachineConfig struct { + // CpuCount: The number of CPU's in the VM instance. + CpuCount int64 `json:"cpuCount,omitempty"` + + // ForceSendFields is a list of field names (e.g. "CpuCount") 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. "CpuCount") 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 *MachineConfig) MarshalJSON() ([]byte, error) { + type NoMethod MachineConfig + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// MigrationSource: Subset of the source instance configuration that is +// available when reading the cluster resource. +type MigrationSource struct { + // HostPort: Output only. The host and port of the on-premises instance + // in host:port format + HostPort string `json:"hostPort,omitempty"` + + // ReferenceId: Output only. Place holder for the external source + // identifier(e.g DMS job name) that created the cluster. + ReferenceId string `json:"referenceId,omitempty"` + + // SourceType: Output only. Type of migration source. + // + // Possible values: + // "MIGRATION_SOURCE_TYPE_UNSPECIFIED" - Migration source is unknown. + // "DMS" - DMS source means the cluster was created via DMS migration + // job. + SourceType string `json:"sourceType,omitempty"` + + // ForceSendFields is a list of field names (e.g. "HostPort") 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. "HostPort") 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 *MigrationSource) MarshalJSON() ([]byte, error) { + type NoMethod MigrationSource + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// NetworkConfig: Metadata related to network configuration. +type NetworkConfig struct { + // AllocatedIpRange: Optional. Name of the allocated IP range for the + // private IP AlloyDB cluster, for example: + // "google-managed-services-default". If set, the instance IPs for this + // cluster will be created in the allocated range. The range name must + // comply with RFC 1035. Specifically, the name must be 1-63 characters + // long and match the regular expression a-z ([-a-z0-9]*[a-z0-9])?. + // Field name is intended to be consistent with CloudSQL. + AllocatedIpRange string `json:"allocatedIpRange,omitempty"` + + // Network: Required. The resource link for the VPC network in which + // cluster resources are created and from which they are accessible via + // Private IP. The network must belong to the same project as the + // cluster. It is specified in the form: + // "projects/{project_number}/global/networks/{network_id}". This is + // required to create a cluster. It can be updated, but it cannot be + // removed. + Network string `json:"network,omitempty"` + + // ForceSendFields is a list of field names (e.g. "AllocatedIpRange") 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. "AllocatedIpRange") 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 *NetworkConfig) MarshalJSON() ([]byte, error) { + type NoMethod NetworkConfig + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// Node: Details of a single node in the instance. Nodes in an AlloyDB +// instance are ephemereal, they can change during update, failover, +// autohealing and resize operations. +type Node struct { + // Id: The identifier of the VM e.g. "test-read-0601-407e52be-ms3l". + Id string `json:"id,omitempty"` + + // Ip: The private IP address of the VM e.g. "10.57.0.34". + Ip string `json:"ip,omitempty"` + + // State: Determined by state of the compute VM and postgres-service + // health. Compute VM state can have values listed in + // https://cloud.google.com/compute/docs/instances/instance-life-cycle + // and postgres-service health can have values: HEALTHY and UNHEALTHY. + State string `json:"state,omitempty"` + + // ZoneId: The Compute Engine zone of the VM e.g. "us-central1-b". + ZoneId string `json:"zoneId,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 *Node) MarshalJSON() ([]byte, error) { + type NoMethod Node + 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 { + // Done: If the value is `false`, it means the operation is still in + // progress. If `true`, the operation is completed, and either `error` + // or `response` is available. + Done bool `json:"done,omitempty"` + + // Error: The error result of the operation in case of failure or + // cancellation. + Error *Status `json:"error,omitempty"` + + // Metadata: Service-specific metadata associated with the operation. It + // typically contains progress information and common metadata such as + // create time. Some services might not provide such metadata. Any + // method that returns a long-running operation should document the + // metadata type, if any. + Metadata googleapi.RawMessage `json:"metadata,omitempty"` + + // Name: The server-assigned name, which is only unique within the same + // service that originally returns it. If you use the default HTTP + // mapping, the `name` should be a resource name ending with + // `operations/{unique_id}`. + Name string `json:"name,omitempty"` + + // Response: The normal, successful response of the operation. If the + // original method returns no data on success, such as `Delete`, the + // response is `google.protobuf.Empty`. If the original method is + // standard `Get`/`Create`/`Update`, the response should be the + // resource. For other methods, the response should have the type + // `XxxResponse`, where `Xxx` is the original method name. For example, + // if the original method name is `TakeSnapshot()`, the inferred + // response type is `TakeSnapshotResponse`. + Response googleapi.RawMessage `json:"response,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the + // server. + googleapi.ServerResponse `json:"-"` + + // ForceSendFields is a list of field names (e.g. "Done") 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. "Done") 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 *Operation) MarshalJSON() ([]byte, error) { + type NoMethod Operation + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// OperationMetadata: Represents the metadata of the long-running +// operation. +type OperationMetadata struct { + // ApiVersion: Output only. API version used to start the operation. + ApiVersion string `json:"apiVersion,omitempty"` + + // CreateTime: Output only. The time the operation was created. + CreateTime string `json:"createTime,omitempty"` + + // EndTime: Output only. The time the operation finished running. + EndTime string `json:"endTime,omitempty"` + + // RequestedCancellation: Output only. Identifies whether the user has + // requested cancellation of the operation. Operations that have + // successfully been cancelled have Operation.error value with a + // google.rpc.Status.code of 1, corresponding to `Code.CANCELLED`. + RequestedCancellation bool `json:"requestedCancellation,omitempty"` + + // StatusMessage: Output only. Human-readable status of the operation, + // if any. + StatusMessage string `json:"statusMessage,omitempty"` + + // Target: Output only. Server-defined resource path for the target of + // the operation. + Target string `json:"target,omitempty"` + + // Verb: Output only. Name of the verb executed by the operation. + Verb string `json:"verb,omitempty"` + + // ForceSendFields is a list of field names (e.g. "ApiVersion") 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. "ApiVersion") 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 *OperationMetadata) MarshalJSON() ([]byte, error) { + type NoMethod OperationMetadata + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// PrimaryConfig: Configuration for the primary cluster. It has the list +// of clusters that are replicating from this cluster. This should be +// set if and only if the cluster is of type PRIMARY. +type PrimaryConfig struct { + // SecondaryClusterNames: Output only. Names of the clusters that are + // replicating from this cluster. + SecondaryClusterNames []string `json:"secondaryClusterNames,omitempty"` + + // ForceSendFields is a list of field names (e.g. + // "SecondaryClusterNames") 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. "SecondaryClusterNames") 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 *PrimaryConfig) MarshalJSON() ([]byte, error) { + type NoMethod PrimaryConfig + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// PromoteClusterRequest: Message for promoting a Cluster +type PromoteClusterRequest struct { + // Etag: Optional. The current etag of the Cluster. If an etag is + // provided and does not match the current etag of the Cluster, deletion + // will be blocked and an ABORTED error will be returned. + Etag string `json:"etag,omitempty"` + + // RequestId: Optional. An optional request ID to identify requests. + // Specify a unique request ID so that if you must retry your request, + // the server will know to ignore the request if it has already been + // completed. The server will guarantee that for at least 60 minutes + // after the first request. For example, consider a situation where you + // make an initial request and the request times out. If you make the + // request again with the same request ID, the server can check if + // original operation with the same request ID was received, and if so, + // will ignore the second request. This prevents clients from + // accidentally creating duplicate commitments. The request ID must be a + // valid UUID with the exception that zero UUID is not supported + // (00000000-0000-0000-0000-000000000000). + RequestId string `json:"requestId,omitempty"` + + // ValidateOnly: Optional. If set, performs request validation (e.g. + // permission checks and any other type of validation), but do not + // actually execute the delete. + ValidateOnly bool `json:"validateOnly,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Etag") 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. "Etag") 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 *PromoteClusterRequest) MarshalJSON() ([]byte, error) { + type NoMethod PromoteClusterRequest + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// QuantityBasedExpiry: A backup's position in a quantity-based +// retention queue, of backups with the same source cluster and type, +// with length, retention, specified by the backup's retention policy. +// Once the position is greater than the retention, the backup is +// eligible to be garbage collected. Example: 5 backups from the same +// source cluster and type with a quantity-based retention of 3 and +// denoted by backup_id (position, retention). Safe: backup_5 (1, 3), +// backup_4, (2, 3), backup_3 (3, 3). Awaiting garbage collection: +// backup_2 (4, 3), backup_1 (5, 3) +type QuantityBasedExpiry struct { + // RetentionCount: Output only. The backup's position among its backups + // with the same source cluster and type, by descending chronological + // order create time(i.e. newest first). + RetentionCount int64 `json:"retentionCount,omitempty"` + + // TotalRetentionCount: Output only. The length of the quantity-based + // queue, specified by the backup's retention policy. + TotalRetentionCount int64 `json:"totalRetentionCount,omitempty"` + + // ForceSendFields is a list of field names (e.g. "RetentionCount") 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. "RetentionCount") 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 *QuantityBasedExpiry) MarshalJSON() ([]byte, error) { + type NoMethod QuantityBasedExpiry + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// QuantityBasedRetention: A quantity based policy specifies that a +// certain number of the most recent successful backups should be +// retained. +type QuantityBasedRetention struct { + // Count: The number of backups to retain. + Count int64 `json:"count,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Count") 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. "Count") 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 *QuantityBasedRetention) MarshalJSON() ([]byte, error) { + type NoMethod QuantityBasedRetention + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// QueryInsightsInstanceConfig: QueryInsights Instance specific +// configuration. +type QueryInsightsInstanceConfig struct { + // QueryPlansPerMinute: Number of query execution plans captured by + // Insights per minute for all queries combined. The default value is 5. + // Any integer between 0 and 20 is considered valid. + QueryPlansPerMinute int64 `json:"queryPlansPerMinute,omitempty"` + + // QueryStringLength: Query string length. The default value is 1024. + // Any integer between 256 and 4500 is considered valid. + QueryStringLength int64 `json:"queryStringLength,omitempty"` + + // RecordApplicationTags: Record application tags for an instance. This + // flag is turned "on" by default. + RecordApplicationTags bool `json:"recordApplicationTags,omitempty"` + + // RecordClientAddress: Record client address for an instance. Client + // address is PII information. This flag is turned "on" by default. + RecordClientAddress bool `json:"recordClientAddress,omitempty"` + + // ForceSendFields is a list of field names (e.g. "QueryPlansPerMinute") + // 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. "QueryPlansPerMinute") 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 *QueryInsightsInstanceConfig) MarshalJSON() ([]byte, error) { + type NoMethod QueryInsightsInstanceConfig + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// ReadPoolConfig: Configuration for a read pool instance. +type ReadPoolConfig struct { + // NodeCount: Read capacity, i.e. number of nodes in a read pool + // instance. + NodeCount int64 `json:"nodeCount,omitempty"` + + // ForceSendFields is a list of field names (e.g. "NodeCount") 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. "NodeCount") 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 *ReadPoolConfig) MarshalJSON() ([]byte, error) { + type NoMethod ReadPoolConfig + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +type RestartInstanceRequest struct { + // RequestId: Optional. An optional request ID to identify requests. + // Specify a unique request ID so that if you must retry your request, + // the server will know to ignore the request if it has already been + // completed. The server will guarantee that for at least 60 minutes + // after the first request. For example, consider a situation where you + // make an initial request and the request times out. If you make the + // request again with the same request ID, the server can check if + // original operation with the same request ID was received, and if so, + // will ignore the second request. This prevents clients from + // accidentally creating duplicate commitments. The request ID must be a + // valid UUID with the exception that zero UUID is not supported + // (00000000-0000-0000-0000-000000000000). + RequestId string `json:"requestId,omitempty"` + + // ValidateOnly: Optional. If set, performs request validation (e.g. + // permission checks and any other type of validation), but do not + // actually execute the restart. + ValidateOnly bool `json:"validateOnly,omitempty"` + + // ForceSendFields is a list of field names (e.g. "RequestId") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "RequestId") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *RestartInstanceRequest) MarshalJSON() ([]byte, error) { + type NoMethod RestartInstanceRequest + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// RestoreClusterRequest: Message for restoring a Cluster from a backup +// or another cluster at a given point in time. +type RestoreClusterRequest struct { + // BackupSource: Backup source. + BackupSource *BackupSource `json:"backupSource,omitempty"` + + // Cluster: Required. The resource being created + Cluster *Cluster `json:"cluster,omitempty"` + + // ClusterId: Required. ID of the requesting object. + ClusterId string `json:"clusterId,omitempty"` + + // ContinuousBackupSource: ContinuousBackup source. Continuous backup + // needs to be enabled in the source cluster for this operation to + // succeed. + ContinuousBackupSource *ContinuousBackupSource `json:"continuousBackupSource,omitempty"` + + // RequestId: Optional. An optional request ID to identify requests. + // Specify a unique request ID so that if you must retry your request, + // the server will know to ignore the request if it has already been + // completed. The server will guarantee that for at least 60 minutes + // since the first request. For example, consider a situation where you + // make an initial request and the request times out. If you make the + // request again with the same request ID, the server can check if + // original operation with the same request ID was received, and if so, + // will ignore the second request. This prevents clients from + // accidentally creating duplicate commitments. The request ID must be a + // valid UUID with the exception that zero UUID is not supported + // (00000000-0000-0000-0000-000000000000). + RequestId string `json:"requestId,omitempty"` + + // ValidateOnly: Optional. If set, performs request validation (e.g. + // permission checks and any other type of validation), but do not + // actually execute the import request. + ValidateOnly bool `json:"validateOnly,omitempty"` + + // ForceSendFields is a list of field names (e.g. "BackupSource") 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. "BackupSource") 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 *RestoreClusterRequest) MarshalJSON() ([]byte, error) { + type NoMethod RestoreClusterRequest + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// SecondaryConfig: Configuration information for the secondary cluster. +// This should be set if and only if the cluster is of type SECONDARY. +type SecondaryConfig struct { + // PrimaryClusterName: The name of the primary cluster name with the + // format: * projects/{project}/locations/{region}/clusters/{cluster_id} + PrimaryClusterName string `json:"primaryClusterName,omitempty"` + + // ForceSendFields is a list of field names (e.g. "PrimaryClusterName") + // 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. "PrimaryClusterName") 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 *SecondaryConfig) MarshalJSON() ([]byte, error) { + type NoMethod SecondaryConfig + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// SslConfig: SSL configuration. +type SslConfig struct { + // CaSource: Optional. Certificate Authority (CA) source. Only + // CA_SOURCE_MANAGED is supported currently, and is the default value. + // + // Possible values: + // "CA_SOURCE_UNSPECIFIED" - Certificate Authority (CA) source not + // specified. Defaults to CA_SOURCE_MANAGED. + // "CA_SOURCE_MANAGED" - Certificate Authority (CA) managed by the + // AlloyDB Cluster. + CaSource string `json:"caSource,omitempty"` + + // SslMode: Optional. SSL mode. Specifies client-server SSL/TLS + // connection behavior. + // + // Possible values: + // "SSL_MODE_UNSPECIFIED" - SSL mode not specified. Defaults to + // ENCRYPTED_ONLY. + // "SSL_MODE_ALLOW" - SSL connections are optional. CA verification + // not enforced. + // "SSL_MODE_REQUIRE" - SSL connections are required. CA verification + // not enforced. Clients may use locally self-signed certificates + // (default psql client behavior). + // "SSL_MODE_VERIFY_CA" - SSL connections are required. CA + // verification enforced. Clients must have certificates signed by a + // Cluster CA, e.g. via GenerateClientCertificate. + // "ALLOW_UNENCRYPTED_AND_ENCRYPTED" - SSL connections are optional. + // CA verification not enforced. + // "ENCRYPTED_ONLY" - SSL connections are required. CA verification + // not enforced. + SslMode string `json:"sslMode,omitempty"` + + // ForceSendFields is a list of field names (e.g. "CaSource") 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. "CaSource") 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 *SslConfig) MarshalJSON() ([]byte, error) { + type NoMethod SslConfig + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// Status: The `Status` type defines a logical error model that is +// suitable for different programming environments, including REST APIs +// and RPC APIs. It is used by gRPC (https://github.com/grpc). Each +// `Status` message contains three pieces of data: error code, error +// message, and error details. You can find out more about this error +// model and how to work with it in the API Design Guide +// (https://cloud.google.com/apis/design/errors). +type Status struct { + // Code: The status code, which should be an enum value of + // google.rpc.Code. + Code int64 `json:"code,omitempty"` + + // Details: A list of messages that carry the error details. There is a + // common set of message types for APIs to use. + Details []googleapi.RawMessage `json:"details,omitempty"` + + // Message: A developer-facing error message, which should be in + // English. Any user-facing error message should be localized and sent + // in the google.rpc.Status.details field, or localized by the client. + Message string `json:"message,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Code") 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. "Code") 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 *Status) MarshalJSON() ([]byte, error) { + type NoMethod Status + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// StorageDatabasecenterPartnerapiV1mainAvailabilityConfiguration: +// Configuration for availability of database instance +type StorageDatabasecenterPartnerapiV1mainAvailabilityConfiguration struct { + // AvailabilityType: Availability type. Potential values: * `ZONAL`: The + // instance serves data from only one zone. Outages in that zone affect + // data accessibility. * `REGIONAL`: The instance can serve data from + // more than one zone in a region (it is highly available). + // + // Possible values: + // "AVAILABILITY_TYPE_UNSPECIFIED" + // "ZONAL" - Zonal available instance. + // "REGIONAL" - Regional available instance. + // "MULTI_REGIONAL" - Multi regional instance + // "AVAILABILITY_TYPE_OTHER" - For rest of the other category + AvailabilityType string `json:"availabilityType,omitempty"` + + ExternalReplicaConfigured bool `json:"externalReplicaConfigured,omitempty"` + + PromotableReplicaConfigured bool `json:"promotableReplicaConfigured,omitempty"` + + // ForceSendFields is a list of field names (e.g. "AvailabilityType") 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. "AvailabilityType") 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 *StorageDatabasecenterPartnerapiV1mainAvailabilityConfiguration) MarshalJSON() ([]byte, error) { + type NoMethod StorageDatabasecenterPartnerapiV1mainAvailabilityConfiguration + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// StorageDatabasecenterPartnerapiV1mainBackupConfiguration: +// Configuration for automatic backups +type StorageDatabasecenterPartnerapiV1mainBackupConfiguration struct { + // AutomatedBackupEnabled: Whether customer visible automated backups + // are enabled on the instance. + AutomatedBackupEnabled bool `json:"automatedBackupEnabled,omitempty"` + + // BackupRetentionSettings: Backup retention settings. + BackupRetentionSettings *StorageDatabasecenterPartnerapiV1mainRetentionSettings `json:"backupRetentionSettings,omitempty"` + + // ForceSendFields is a list of field names (e.g. + // "AutomatedBackupEnabled") 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. "AutomatedBackupEnabled") + // 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 *StorageDatabasecenterPartnerapiV1mainBackupConfiguration) MarshalJSON() ([]byte, error) { + type NoMethod StorageDatabasecenterPartnerapiV1mainBackupConfiguration + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// StorageDatabasecenterPartnerapiV1mainBackupRun: A backup run. +type StorageDatabasecenterPartnerapiV1mainBackupRun struct { + // EndTime: The time the backup operation completed. REQUIRED + EndTime string `json:"endTime,omitempty"` + + // Error: Information about why the backup operation failed. This is + // only present if the run has the FAILED status. OPTIONAL + Error *StorageDatabasecenterPartnerapiV1mainOperationError `json:"error,omitempty"` + + // StartTime: The time the backup operation started. REQUIRED + StartTime string `json:"startTime,omitempty"` + + // Status: The status of this run. REQUIRED + // + // Possible values: + // "STATUS_UNSPECIFIED" + // "SUCCESSFUL" - The backup was successful. + // "FAILED" - The backup was unsuccessful. + Status string `json:"status,omitempty"` + + // ForceSendFields is a list of field names (e.g. "EndTime") 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. "EndTime") 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 *StorageDatabasecenterPartnerapiV1mainBackupRun) MarshalJSON() ([]byte, error) { + type NoMethod StorageDatabasecenterPartnerapiV1mainBackupRun + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// StorageDatabasecenterPartnerapiV1mainDatabaseResourceFeed: +// DatabaseResourceFeed is the top level proto to be used to ingest +// different database resource level events into Condor platform. +type StorageDatabasecenterPartnerapiV1mainDatabaseResourceFeed struct { + // FeedTimestamp: Required. Timestamp when feed is generated. + FeedTimestamp string `json:"feedTimestamp,omitempty"` + + // FeedType: Required. Type feed to be ingested into condor + // + // Possible values: + // "FEEDTYPE_UNSPECIFIED" + // "RESOURCE_METADATA" - Database resource metadata feed from control + // plane + // "OBSERVABILITY_DATA" - Database resource monitoring data + // "COMPLIANCE_DATA" - Database resource compliance feed + FeedType string `json:"feedType,omitempty"` + + // ResourceId: Required. Primary key associated with the Resource + ResourceId *StorageDatabasecenterPartnerapiV1mainDatabaseResourceId `json:"resourceId,omitempty"` + + // ResourceMetadata: More feed data would be added in subsequent CLs + ResourceMetadata *StorageDatabasecenterPartnerapiV1mainDatabaseResourceMetadata `json:"resourceMetadata,omitempty"` + + // ForceSendFields is a list of field names (e.g. "FeedTimestamp") 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. "FeedTimestamp") 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 *StorageDatabasecenterPartnerapiV1mainDatabaseResourceFeed) MarshalJSON() ([]byte, error) { + type NoMethod StorageDatabasecenterPartnerapiV1mainDatabaseResourceFeed + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// StorageDatabasecenterPartnerapiV1mainDatabaseResourceId: +// DatabaseResourceId will serve as primary key for any resource +// ingestion event. +type StorageDatabasecenterPartnerapiV1mainDatabaseResourceId struct { + // Provider: Required. Cloud provider name. Ex: + // GCP/AWS/Azure/OnPrem/SelfManaged + // + // Possible values: + // "PROVIDER_UNSPECIFIED" + // "GCP" - Google cloud platform provider + // "AWS" - Amazon web service + // "AZURE" - Azure web service + // "ONPREM" - On-prem database provider + // "SELFMANAGED" - Self-managed database provider + // "PROVIDER_OTHER" - For rest of the other category + Provider string `json:"provider,omitempty"` + + // ResourceType: Required. The type of resource this ID is identifying. + // Ex google.sqladmin.Instance, google.alloydb.cluster, + // google.sqladmin.Backup REQUIRED + ResourceType string `json:"resourceType,omitempty"` + + // UniqueId: Required. A service-local token that distinguishes this + // resource from other resources within the same service. + UniqueId string `json:"uniqueId,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Provider") 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. "Provider") 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 *StorageDatabasecenterPartnerapiV1mainDatabaseResourceId) MarshalJSON() ([]byte, error) { + type NoMethod StorageDatabasecenterPartnerapiV1mainDatabaseResourceId + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// StorageDatabasecenterPartnerapiV1mainDatabaseResourceMetadata: Common +// model for database resource instance metadata. +type StorageDatabasecenterPartnerapiV1mainDatabaseResourceMetadata struct { + // AvailabilityConfiguration: Availability configuration for this + // instance + AvailabilityConfiguration *StorageDatabasecenterPartnerapiV1mainAvailabilityConfiguration `json:"availabilityConfiguration,omitempty"` + + // BackupConfiguration: Backup configuration for this instance + BackupConfiguration *StorageDatabasecenterPartnerapiV1mainBackupConfiguration `json:"backupConfiguration,omitempty"` + + // BackupRun: Latest backup run information for this instance + BackupRun *StorageDatabasecenterPartnerapiV1mainBackupRun `json:"backupRun,omitempty"` + + // CreationTime: The creation time of the resource, i.e. the time when + // resource is created and recorded in partner service. + CreationTime string `json:"creationTime,omitempty"` + + // CurrentState: Current state of the instance. + // + // Possible values: + // "STATE_UNSPECIFIED" + // "HEALTHY" - The instance is running. + // "UNHEALTHY" - Instance being created, updated, deleted or under + // maintenance + // "STATE_OTHER" - For rest of the other category + CurrentState string `json:"currentState,omitempty"` + + // ExpectedState: The actual instance state. + // + // Possible values: + // "STATE_UNSPECIFIED" + // "HEALTHY" - The instance is running. + // "UNHEALTHY" - Instance being created, updated, deleted or under + // maintenance + // "STATE_OTHER" - For rest of the other category + ExpectedState string `json:"expectedState,omitempty"` + + // Id: Required. Unique identifier for a Database resource + Id *StorageDatabasecenterPartnerapiV1mainDatabaseResourceId `json:"id,omitempty"` + + // InstanceType: The type of the instance. Specified at creation time. + // + // Possible values: + // "INSTANCE_TYPE_UNSPECIFIED" + // "PRIMARY" - A regular primary database instance. + // "READ_REPLICA" - An instance acting as a read-replica. + // "OTHER" - For rest of the other categories. + InstanceType string `json:"instanceType,omitempty"` + + // Location: The resource location. REQUIRED + Location string `json:"location,omitempty"` + + // PrimaryResourceId: Unique identifier for this resource's immediate + // parent resource. This parent resource id would be used to build + // resource hierarchy in condor platform. + PrimaryResourceId *StorageDatabasecenterPartnerapiV1mainDatabaseResourceId `json:"primaryResourceId,omitempty"` + + // Product: The product this resource represents. + Product *StorageDatabasecenterProtoCommonProduct `json:"product,omitempty"` + + // ResourceContainer: Closest parent Cloud Resource Manager container of + // this resource. It must either be resource name of a Cloud Resource + // Manager project, for ex: "projects/123". + ResourceContainer string `json:"resourceContainer,omitempty"` + + // ResourceName: Required. Different from unique_id, a resource name can + // be reused over time. That is after a resource named "ABC" is deleted, + // the name "ABC" can be used to to create a new resource within the + // same source. + ResourceName string `json:"resourceName,omitempty"` + + // UpdationTime: The time at which the resource was updated and recorded + // at partner service. + UpdationTime string `json:"updationTime,omitempty"` + + // UserLabels: User-provided labels, represented as a dictionary where + // each label is a single key value pair. + UserLabels map[string]string `json:"userLabels,omitempty"` + + // ForceSendFields is a list of field names (e.g. + // "AvailabilityConfiguration") 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. + // "AvailabilityConfiguration") 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 *StorageDatabasecenterPartnerapiV1mainDatabaseResourceMetadata) MarshalJSON() ([]byte, error) { + type NoMethod StorageDatabasecenterPartnerapiV1mainDatabaseResourceMetadata + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// StorageDatabasecenterPartnerapiV1mainOperationError: An error that +// occurred during a backup creation operation. +type StorageDatabasecenterPartnerapiV1mainOperationError struct { + // Code: Identifies the specific error that occurred. REQUIRED + Code string `json:"code,omitempty"` + + // Message: Additional information about the error encountered. REQUIRED + Message string `json:"message,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Code") 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. "Code") 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 *StorageDatabasecenterPartnerapiV1mainOperationError) MarshalJSON() ([]byte, error) { + type NoMethod StorageDatabasecenterPartnerapiV1mainOperationError + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +type StorageDatabasecenterPartnerapiV1mainRetentionSettings struct { + QuantityBasedRetention int64 `json:"quantityBasedRetention,omitempty"` + + // RetentionUnit: The unit that 'retained_backups' represents. + // + // Possible values: + // "RETENTION_UNIT_UNSPECIFIED" - Backup retention unit is + // unspecified, will be treated as COUNT. + // "COUNT" - Retention will be by count, eg. "retain the most recent 7 + // backups". + // "TIME" - Retention will be by Time, eg. "retain the last 7 days + // backups". + // "RETENTION_UNIT_OTHER" - For rest of the other category + RetentionUnit string `json:"retentionUnit,omitempty"` + + TimeBasedRetention string `json:"timeBasedRetention,omitempty"` + + // ForceSendFields is a list of field names (e.g. + // "QuantityBasedRetention") 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. "QuantityBasedRetention") + // 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 *StorageDatabasecenterPartnerapiV1mainRetentionSettings) MarshalJSON() ([]byte, error) { + type NoMethod StorageDatabasecenterPartnerapiV1mainRetentionSettings + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// StorageDatabasecenterProtoCommonProduct: Product specification for +// Condor resources. +type StorageDatabasecenterProtoCommonProduct struct { + // Engine: The specific engine that the underlying database is running. + // + // Possible values: + // "ENGINE_UNSPECIFIED" - UNSPECIFIED means engine type is not known + // or available. + // "MYSQL" - MySQL binary running as engine in database instance. + // "POSTGRES" - Postgres binary running as engine in database + // instance. + // "SQL_SERVER" - SQLServer binary running as engine in database + // instance. + // "NATIVE" - Native database binary running as engine in instance. + // "SPANGRES" - Cloud Spanner with Postgres dialect. + // "ENGINE_OTHER" - Other refers to rest of other database engine. + // This is to be when engine is known, but it is not present in this + // enum. + Engine string `json:"engine,omitempty"` + + // Type: Type of specific database product. It could be CloudSQL, + // AlloyDB etc.. + // + // Possible values: + // "PRODUCT_TYPE_UNSPECIFIED" - UNSPECIFIED means product type is not + // known or available. + // "CLOUD_SQL" - Cloud SQL product area in GCP + // "ALLOYDB" - AlloyDB product area in GCP + // "SPANNER" - Spanner product area in GCP + // "ON_PREM" - On premises database product. + // "PRODUCT_TYPE_OTHER" - Other refers to rest of other product type. + // This is to be when product type is known, but it is not present in + // this enum. + Type string `json:"type,omitempty"` + + // Version: Version of the underlying database engine. Example values: + // For MySQL, it could be "8.0", "5.7" etc.. For Postgres, it could be + // "14", "15" etc.. + Version string `json:"version,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Engine") 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. "Engine") 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 *StorageDatabasecenterProtoCommonProduct) MarshalJSON() ([]byte, error) { + type NoMethod StorageDatabasecenterProtoCommonProduct + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// StringRestrictions: Restrictions on STRING type values +type StringRestrictions struct { + // AllowedValues: The list of allowed values, if bounded. This field + // will be empty if there is a unbounded number of allowed values. + AllowedValues []string `json:"allowedValues,omitempty"` + + // ForceSendFields is a list of field names (e.g. "AllowedValues") 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. "AllowedValues") 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 *StringRestrictions) MarshalJSON() ([]byte, error) { + type NoMethod StringRestrictions + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// SupportedDatabaseFlag: SupportedDatabaseFlag gives general +// information about a database flag, like type and allowed values. This +// is a static value that is defined on the server side, and it cannot +// be modified by callers. To set the Database flags on a particular +// Instance, a caller should modify the Instance.database_flags field. +type SupportedDatabaseFlag struct { + // AcceptsMultipleValues: Whether the database flag accepts multiple + // values. If true, a comma-separated list of stringified values may be + // specified. + AcceptsMultipleValues bool `json:"acceptsMultipleValues,omitempty"` + + // FlagName: The name of the database flag, e.g. "max_allowed_packets". + // The is a possibly key for the Instance.database_flags map field. + FlagName string `json:"flagName,omitempty"` + + // IntegerRestrictions: Restriction on INTEGER type value. + IntegerRestrictions *IntegerRestrictions `json:"integerRestrictions,omitempty"` + + // Name: The name of the flag resource, following Google Cloud + // conventions, e.g.: * + // projects/{project}/locations/{location}/flags/{flag} This field + // currently has no semantic meaning. + Name string `json:"name,omitempty"` + + // RequiresDbRestart: Whether setting or updating this flag on an + // Instance requires a database restart. If a flag that requires + // database restart is set, the backend will automatically restart the + // database (making sure to satisfy any availability SLO's). + RequiresDbRestart bool `json:"requiresDbRestart,omitempty"` + + // StringRestrictions: Restriction on STRING type value. + StringRestrictions *StringRestrictions `json:"stringRestrictions,omitempty"` + + // SupportedDbVersions: Major database engine versions for which this + // flag is supported. + // + // Possible values: + // "DATABASE_VERSION_UNSPECIFIED" - This is an unknown database + // version. + // "POSTGRES_13" - DEPRECATED - The database version is Postgres 13. + // "POSTGRES_14" - The database version is Postgres 14. + SupportedDbVersions []string `json:"supportedDbVersions,omitempty"` + + // Possible values: + // "VALUE_TYPE_UNSPECIFIED" - This is an unknown flag type. + // "STRING" - String type flag. + // "INTEGER" - Integer type flag. + // "FLOAT" - Float type flag. + // "NONE" - Denotes that the flag does not accept any values. + ValueType string `json:"valueType,omitempty"` + + // ForceSendFields is a list of field names (e.g. + // "AcceptsMultipleValues") 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. "AcceptsMultipleValues") 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 *SupportedDatabaseFlag) MarshalJSON() ([]byte, error) { + type NoMethod SupportedDatabaseFlag + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// TimeBasedRetention: A time based retention policy specifies that all +// backups within a certain time period should be retained. +type TimeBasedRetention struct { + // RetentionPeriod: The retention period. + RetentionPeriod string `json:"retentionPeriod,omitempty"` + + // ForceSendFields is a list of field names (e.g. "RetentionPeriod") 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. "RetentionPeriod") 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 *TimeBasedRetention) MarshalJSON() ([]byte, error) { + type NoMethod TimeBasedRetention + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// User: Message describing User object. +type User struct { + // DatabaseRoles: Optional. List of database roles this user has. The + // database role strings are subject to the PostgreSQL naming + // conventions. + DatabaseRoles []string `json:"databaseRoles,omitempty"` + + // Name: Output only. Name of the resource in the form of + // projects/{project}/locations/{location}/cluster/{cluster}/users/{user} + // . + Name string `json:"name,omitempty"` + + // Password: Input only. Password for the user. + Password string `json:"password,omitempty"` + + // UserType: Optional. Type of this user. + // + // Possible values: + // "USER_TYPE_UNSPECIFIED" - Unspecified user type. + // "ALLOYDB_BUILT_IN" - The default user type that authenticates via + // password-based authentication. + // "ALLOYDB_IAM_USER" - Database user that can authenticate via + // IAM-Based authentication. + UserType string `json:"userType,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 *User) MarshalJSON() ([]byte, error) { + type NoMethod User + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// UserPassword: The username/password for a database user. Used for +// specifying initial users at cluster creation time. +type UserPassword struct { + // Password: The initial password for the user. + Password string `json:"password,omitempty"` + + // User: The database username. + User string `json:"user,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Password") 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. "Password") 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 *UserPassword) MarshalJSON() ([]byte, error) { + type NoMethod UserPassword + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// WeeklySchedule: A weekly schedule starts a backup at prescribed start +// times within a day, for the specified days of the week. The weekly +// schedule message is flexible and can be used to create many types of +// schedules. For example, to have a daily backup that starts at 22:00, +// configure the `start_times` field to have one element "22:00" and the +// `days_of_week` field to have all seven days of the week. +type WeeklySchedule struct { + // DaysOfWeek: The days of the week to perform a backup. If this field + // is left empty, the default of every day of the week is used. + // + // Possible values: + // "DAY_OF_WEEK_UNSPECIFIED" - The day of the week is unspecified. + // "MONDAY" - Monday + // "TUESDAY" - Tuesday + // "WEDNESDAY" - Wednesday + // "THURSDAY" - Thursday + // "FRIDAY" - Friday + // "SATURDAY" - Saturday + // "SUNDAY" - Sunday + DaysOfWeek []string `json:"daysOfWeek,omitempty"` + + // StartTimes: The times during the day to start a backup. The start + // times are assumed to be in UTC and to be an exact hour (e.g., + // 04:00:00). If no start times are provided, a single fixed start time + // is chosen arbitrarily. + StartTimes []*GoogleTypeTimeOfDay `json:"startTimes,omitempty"` + + // ForceSendFields is a list of field names (e.g. "DaysOfWeek") 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. "DaysOfWeek") 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 *WeeklySchedule) MarshalJSON() ([]byte, error) { + type NoMethod WeeklySchedule + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// method id "alloydb.projects.locations.get": + +type ProjectsLocationsGetCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// Get: Gets information about a location. +// +// - name: Resource name for the location. +func (r *ProjectsLocationsService) Get(name string) *ProjectsLocationsGetCall { + c := &ProjectsLocationsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *ProjectsLocationsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsGetCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// IfNoneMatch sets the optional parameter which makes the operation +// fail if the object's ETag matches the given value. This is useful for +// getting updates only after the object has changed since the last +// request. Use googleapi.IsNotModified to check whether the response +// error from Do is the result of In-None-Match. +func (c *ProjectsLocationsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsGetCall { + c.ifNoneMatch_ = entityTag + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *ProjectsLocationsGetCall) Context(ctx context.Context) *ProjectsLocationsGetCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *ProjectsLocationsGetCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsGetCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) + } + var body io.Reader = nil + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("GET", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "name": c.name, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "alloydb.projects.locations.get" call. +// Exactly one of *GoogleCloudLocationLocation or error will be non-nil. +// Any non-2xx status code is an error. Response headers are in either +// *GoogleCloudLocationLocation.ServerResponse.Header or (if a response +// was returned at all) in error.(*googleapi.Error).Header. Use +// googleapi.IsNotModified to check whether the returned error was +// because http.StatusNotModified was returned. +func (c *ProjectsLocationsGetCall) Do(opts ...googleapi.CallOption) (*GoogleCloudLocationLocation, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, gensupport.WrapError(&googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + }) + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, gensupport.WrapError(err) + } + ret := &GoogleCloudLocationLocation{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Gets information about a location.", + // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}", + // "httpMethod": "GET", + // "id": "alloydb.projects.locations.get", + // "parameterOrder": [ + // "name" + // ], + // "parameters": { + // "name": { + // "description": "Resource name for the location.", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1/{+name}", + // "response": { + // "$ref": "GoogleCloudLocationLocation" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "alloydb.projects.locations.list": + +type ProjectsLocationsListCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// List: Lists information about the supported locations for this +// service. +// +// - name: The resource that owns the locations collection, if +// applicable. +func (r *ProjectsLocationsService) List(name string) *ProjectsLocationsListCall { + c := &ProjectsLocationsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + return c +} + +// Filter sets the optional parameter "filter": A filter to narrow down +// results to a preferred subset. The filtering language accepts strings +// like "displayName=tokyo", and is documented in more detail in +// AIP-160 (https://google.aip.dev/160). +func (c *ProjectsLocationsListCall) Filter(filter string) *ProjectsLocationsListCall { + c.urlParams_.Set("filter", filter) + return c +} + +// PageSize sets the optional parameter "pageSize": The maximum number +// of results to return. If not set, the service selects a default. +func (c *ProjectsLocationsListCall) PageSize(pageSize int64) *ProjectsLocationsListCall { + c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) + return c +} + +// PageToken sets the optional parameter "pageToken": A page token +// received from the `next_page_token` field in the response. Send that +// page token to receive the subsequent page. +func (c *ProjectsLocationsListCall) PageToken(pageToken string) *ProjectsLocationsListCall { + c.urlParams_.Set("pageToken", pageToken) + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *ProjectsLocationsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsListCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// IfNoneMatch sets the optional parameter which makes the operation +// fail if the object's ETag matches the given value. This is useful for +// getting updates only after the object has changed since the last +// request. Use googleapi.IsNotModified to check whether the response +// error from Do is the result of In-None-Match. +func (c *ProjectsLocationsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsListCall { + c.ifNoneMatch_ = entityTag + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *ProjectsLocationsListCall) Context(ctx context.Context) *ProjectsLocationsListCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *ProjectsLocationsListCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsListCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) + } + var body io.Reader = nil + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}/locations") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("GET", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "name": c.name, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "alloydb.projects.locations.list" call. +// Exactly one of *GoogleCloudLocationListLocationsResponse or error +// will be non-nil. Any non-2xx status code is an error. Response +// headers are in either +// *GoogleCloudLocationListLocationsResponse.ServerResponse.Header or +// (if a response was returned at all) in +// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check +// whether the returned error was because http.StatusNotModified was +// returned. +func (c *ProjectsLocationsListCall) Do(opts ...googleapi.CallOption) (*GoogleCloudLocationListLocationsResponse, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, gensupport.WrapError(&googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + }) + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, gensupport.WrapError(err) + } + ret := &GoogleCloudLocationListLocationsResponse{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Lists information about the supported locations for this service.", + // "flatPath": "v1/projects/{projectsId}/locations", + // "httpMethod": "GET", + // "id": "alloydb.projects.locations.list", + // "parameterOrder": [ + // "name" + // ], + // "parameters": { + // "filter": { + // "description": "A filter to narrow down results to a preferred subset. The filtering language accepts strings like `\"displayName=tokyo\"`, and is documented in more detail in [AIP-160](https://google.aip.dev/160).", + // "location": "query", + // "type": "string" + // }, + // "name": { + // "description": "The resource that owns the locations collection, if applicable.", + // "location": "path", + // "pattern": "^projects/[^/]+$", + // "required": true, + // "type": "string" + // }, + // "pageSize": { + // "description": "The maximum number of results to return. If not set, the service selects a default.", + // "format": "int32", + // "location": "query", + // "type": "integer" + // }, + // "pageToken": { + // "description": "A page token received from the `next_page_token` field in the response. Send that page token to receive the subsequent page.", + // "location": "query", + // "type": "string" + // } + // }, + // "path": "v1/{+name}/locations", + // "response": { + // "$ref": "GoogleCloudLocationListLocationsResponse" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// Pages invokes f for each page of results. +// A non-nil error returned from f will halt the iteration. +// The provided context supersedes any context provided to the Context method. +func (c *ProjectsLocationsListCall) Pages(ctx context.Context, f func(*GoogleCloudLocationListLocationsResponse) 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 "alloydb.projects.locations.backups.create": + +type ProjectsLocationsBackupsCreateCall struct { + s *Service + parent string + backup *Backup + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Create: Creates a new Backup in a given project and location. +// +// - parent: Value for parent. +func (r *ProjectsLocationsBackupsService) Create(parent string, backup *Backup) *ProjectsLocationsBackupsCreateCall { + c := &ProjectsLocationsBackupsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + c.backup = backup + return c +} + +// BackupId sets the optional parameter "backupId": Required. ID of the +// requesting object. +func (c *ProjectsLocationsBackupsCreateCall) BackupId(backupId string) *ProjectsLocationsBackupsCreateCall { + c.urlParams_.Set("backupId", backupId) + return c +} + +// RequestId sets the optional parameter "requestId": An optional +// request ID to identify requests. Specify a unique request ID so that +// if you must retry your request, the server will know to ignore the +// request if it has already been completed. The server will guarantee +// that for at least 60 minutes since the first request. For example, +// consider a situation where you make an initial request and the +// request times out. If you make the request again with the same +// request ID, the server can check if original operation with the same +// request ID was received, and if so, will ignore the second request. +// This prevents clients from accidentally creating duplicate +// commitments. The request ID must be a valid UUID with the exception +// that zero UUID is not supported +// (00000000-0000-0000-0000-000000000000). +func (c *ProjectsLocationsBackupsCreateCall) RequestId(requestId string) *ProjectsLocationsBackupsCreateCall { + c.urlParams_.Set("requestId", requestId) + return c +} + +// ValidateOnly sets the optional parameter "validateOnly": If set, the +// backend validates the request, but doesn't actually execute it. +func (c *ProjectsLocationsBackupsCreateCall) ValidateOnly(validateOnly bool) *ProjectsLocationsBackupsCreateCall { + 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 *ProjectsLocationsBackupsCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsBackupsCreateCall { + 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 *ProjectsLocationsBackupsCreateCall) Context(ctx context.Context) *ProjectsLocationsBackupsCreateCall { + 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 *ProjectsLocationsBackupsCreateCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsBackupsCreateCall) 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.backup) + 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}/backups") + 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 "alloydb.projects.locations.backups.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 *ProjectsLocationsBackupsCreateCall) Do(opts ...googleapi.CallOption) (*Operation, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, gensupport.WrapError(&googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + }) + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, gensupport.WrapError(err) + } + ret := &Operation{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Creates a new Backup in a given project and location.", + // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/backups", + // "httpMethod": "POST", + // "id": "alloydb.projects.locations.backups.create", + // "parameterOrder": [ + // "parent" + // ], + // "parameters": { + // "backupId": { + // "description": "Required. ID of the requesting object.", + // "location": "query", + // "type": "string" + // }, + // "parent": { + // "description": "Required. Value for parent.", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+$", + // "required": true, + // "type": "string" + // }, + // "requestId": { + // "description": "Optional. An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. The server will guarantee that for at least 60 minutes since the first request. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", + // "location": "query", + // "type": "string" + // }, + // "validateOnly": { + // "description": "Optional. If set, the backend validates the request, but doesn't actually execute it.", + // "location": "query", + // "type": "boolean" + // } + // }, + // "path": "v1/{+parent}/backups", + // "request": { + // "$ref": "Backup" + // }, + // "response": { + // "$ref": "Operation" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "alloydb.projects.locations.backups.delete": + +type ProjectsLocationsBackupsDeleteCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Delete: Deletes a single Backup. +// +// - name: Name of the resource. For the required format, see the +// comment on the Backup.name field. +func (r *ProjectsLocationsBackupsService) Delete(name string) *ProjectsLocationsBackupsDeleteCall { + c := &ProjectsLocationsBackupsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + return c +} + +// Etag sets the optional parameter "etag": The current etag of the +// Backup. If an etag is provided and does not match the current etag of +// the Backup, deletion will be blocked and an ABORTED error will be +// returned. +func (c *ProjectsLocationsBackupsDeleteCall) Etag(etag string) *ProjectsLocationsBackupsDeleteCall { + c.urlParams_.Set("etag", etag) + return c +} + +// RequestId sets the optional parameter "requestId": An optional +// request ID to identify requests. Specify a unique request ID so that +// if you must retry your request, the server will know to ignore the +// request if it has already been completed. The server will guarantee +// that for at least 60 minutes after the first request. For example, +// consider a situation where you make an initial request and the +// request times out. If you make the request again with the same +// request ID, the server can check if original operation with the same +// request ID was received, and if so, will ignore the second request. +// This prevents clients from accidentally creating duplicate +// commitments. The request ID must be a valid UUID with the exception +// that zero UUID is not supported +// (00000000-0000-0000-0000-000000000000). +func (c *ProjectsLocationsBackupsDeleteCall) RequestId(requestId string) *ProjectsLocationsBackupsDeleteCall { + c.urlParams_.Set("requestId", requestId) + return c +} + +// ValidateOnly sets the optional parameter "validateOnly": If set, the +// backend validates the request, but doesn't actually execute it. +func (c *ProjectsLocationsBackupsDeleteCall) ValidateOnly(validateOnly bool) *ProjectsLocationsBackupsDeleteCall { + 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 *ProjectsLocationsBackupsDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsBackupsDeleteCall { + 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 *ProjectsLocationsBackupsDeleteCall) Context(ctx context.Context) *ProjectsLocationsBackupsDeleteCall { + 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 *ProjectsLocationsBackupsDeleteCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsBackupsDeleteCall) 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 "alloydb.projects.locations.backups.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 *ProjectsLocationsBackupsDeleteCall) Do(opts ...googleapi.CallOption) (*Operation, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, gensupport.WrapError(&googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + }) + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, gensupport.WrapError(err) + } + ret := &Operation{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Deletes a single Backup.", + // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/backups/{backupsId}", + // "httpMethod": "DELETE", + // "id": "alloydb.projects.locations.backups.delete", + // "parameterOrder": [ + // "name" + // ], + // "parameters": { + // "etag": { + // "description": "Optional. The current etag of the Backup. If an etag is provided and does not match the current etag of the Backup, deletion will be blocked and an ABORTED error will be returned.", + // "location": "query", + // "type": "string" + // }, + // "name": { + // "description": "Required. Name of the resource. For the required format, see the comment on the Backup.name field.", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+/backups/[^/]+$", + // "required": true, + // "type": "string" + // }, + // "requestId": { + // "description": "Optional. An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. The server will guarantee that for at least 60 minutes after the first request. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", + // "location": "query", + // "type": "string" + // }, + // "validateOnly": { + // "description": "Optional. If set, the backend validates the request, but doesn't actually execute it.", + // "location": "query", + // "type": "boolean" + // } + // }, + // "path": "v1/{+name}", + // "response": { + // "$ref": "Operation" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "alloydb.projects.locations.backups.get": + +type ProjectsLocationsBackupsGetCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// Get: Gets details of a single Backup. +// +// - name: Name of the resource. +func (r *ProjectsLocationsBackupsService) Get(name string) *ProjectsLocationsBackupsGetCall { + c := &ProjectsLocationsBackupsGetCall{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 *ProjectsLocationsBackupsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsBackupsGetCall { + 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 *ProjectsLocationsBackupsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsBackupsGetCall { + 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 *ProjectsLocationsBackupsGetCall) Context(ctx context.Context) *ProjectsLocationsBackupsGetCall { + 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 *ProjectsLocationsBackupsGetCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsBackupsGetCall) 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 "alloydb.projects.locations.backups.get" call. +// Exactly one of *Backup or error will be non-nil. Any non-2xx status +// code is an error. Response headers are in either +// *Backup.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 *ProjectsLocationsBackupsGetCall) Do(opts ...googleapi.CallOption) (*Backup, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, gensupport.WrapError(&googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + }) + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, gensupport.WrapError(err) + } + ret := &Backup{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Gets details of a single Backup.", + // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/backups/{backupsId}", + // "httpMethod": "GET", + // "id": "alloydb.projects.locations.backups.get", + // "parameterOrder": [ + // "name" + // ], + // "parameters": { + // "name": { + // "description": "Required. Name of the resource", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+/backups/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1/{+name}", + // "response": { + // "$ref": "Backup" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "alloydb.projects.locations.backups.list": + +type ProjectsLocationsBackupsListCall struct { + s *Service + parent string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// List: Lists Backups in a given project and location. +// +// - parent: Parent value for ListBackupsRequest. +func (r *ProjectsLocationsBackupsService) List(parent string) *ProjectsLocationsBackupsListCall { + c := &ProjectsLocationsBackupsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + return c +} + +// Filter sets the optional parameter "filter": Filtering results +func (c *ProjectsLocationsBackupsListCall) Filter(filter string) *ProjectsLocationsBackupsListCall { + c.urlParams_.Set("filter", filter) + return c +} + +// OrderBy sets the optional parameter "orderBy": Hint for how to order +// the results +func (c *ProjectsLocationsBackupsListCall) OrderBy(orderBy string) *ProjectsLocationsBackupsListCall { + c.urlParams_.Set("orderBy", orderBy) + return c +} + +// PageSize sets the optional parameter "pageSize": Requested page size. +// Server may return fewer items than requested. If unspecified, server +// will pick an appropriate default. +func (c *ProjectsLocationsBackupsListCall) PageSize(pageSize int64) *ProjectsLocationsBackupsListCall { + c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) + return c +} + +// PageToken sets the optional parameter "pageToken": A token +// identifying a page of results the server should return. +func (c *ProjectsLocationsBackupsListCall) PageToken(pageToken string) *ProjectsLocationsBackupsListCall { + 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 *ProjectsLocationsBackupsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsBackupsListCall { + 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 *ProjectsLocationsBackupsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsBackupsListCall { + 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 *ProjectsLocationsBackupsListCall) Context(ctx context.Context) *ProjectsLocationsBackupsListCall { + 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 *ProjectsLocationsBackupsListCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsBackupsListCall) 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}/backups") + 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 "alloydb.projects.locations.backups.list" call. +// Exactly one of *ListBackupsResponse or error will be non-nil. Any +// non-2xx status code is an error. Response headers are in either +// *ListBackupsResponse.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 *ProjectsLocationsBackupsListCall) Do(opts ...googleapi.CallOption) (*ListBackupsResponse, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, gensupport.WrapError(&googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + }) + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, gensupport.WrapError(err) + } + ret := &ListBackupsResponse{ + 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 Backups in a given project and location.", + // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/backups", + // "httpMethod": "GET", + // "id": "alloydb.projects.locations.backups.list", + // "parameterOrder": [ + // "parent" + // ], + // "parameters": { + // "filter": { + // "description": "Filtering results", + // "location": "query", + // "type": "string" + // }, + // "orderBy": { + // "description": "Hint for how to order the results", + // "location": "query", + // "type": "string" + // }, + // "pageSize": { + // "description": "Requested page size. Server may return fewer items than requested. If unspecified, server will pick an appropriate default.", + // "format": "int32", + // "location": "query", + // "type": "integer" + // }, + // "pageToken": { + // "description": "A token identifying a page of results the server should return.", + // "location": "query", + // "type": "string" + // }, + // "parent": { + // "description": "Required. Parent value for ListBackupsRequest", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1/{+parent}/backups", + // "response": { + // "$ref": "ListBackupsResponse" + // }, + // "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 *ProjectsLocationsBackupsListCall) Pages(ctx context.Context, f func(*ListBackupsResponse) 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 "alloydb.projects.locations.backups.patch": + +type ProjectsLocationsBackupsPatchCall struct { + s *Service + name string + backup *Backup + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Patch: Updates the parameters of a single Backup. +// +// - name: Output only. The name of the backup resource with the format: +// - projects/{project}/locations/{region}/backups/{backup_id} where +// the cluster and backup ID segments should satisfy the regex +// expression `[a-z]([a-z0-9-]{0,61}[a-z0-9])?`, e.g. 1-63 characters +// of lowercase letters, numbers, and dashes, starting with a letter, +// and ending with a letter or number. For more details see +// https://google.aip.dev/122. The prefix of the backup resource name +// is the name of the parent resource: * +// projects/{project}/locations/{region}. +func (r *ProjectsLocationsBackupsService) Patch(name string, backup *Backup) *ProjectsLocationsBackupsPatchCall { + c := &ProjectsLocationsBackupsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + c.backup = backup + return c +} + +// AllowMissing sets the optional parameter "allowMissing": If set to +// true, update succeeds even if instance is not found. In that case, a +// new backup is created and `update_mask` is ignored. +func (c *ProjectsLocationsBackupsPatchCall) AllowMissing(allowMissing bool) *ProjectsLocationsBackupsPatchCall { + c.urlParams_.Set("allowMissing", fmt.Sprint(allowMissing)) + return c +} + +// RequestId sets the optional parameter "requestId": An optional +// request ID to identify requests. Specify a unique request ID so that +// if you must retry your request, the server will know to ignore the +// request if it has already been completed. The server will guarantee +// that for at least 60 minutes since the first request. For example, +// consider a situation where you make an initial request and the +// request times out. If you make the request again with the same +// request ID, the server can check if original operation with the same +// request ID was received, and if so, will ignore the second request. +// This prevents clients from accidentally creating duplicate +// commitments. The request ID must be a valid UUID with the exception +// that zero UUID is not supported +// (00000000-0000-0000-0000-000000000000). +func (c *ProjectsLocationsBackupsPatchCall) RequestId(requestId string) *ProjectsLocationsBackupsPatchCall { + c.urlParams_.Set("requestId", requestId) + return c +} + +// UpdateMask sets the optional parameter "updateMask": Field mask is +// used to specify the fields to be overwritten in the Backup resource +// by the update. The fields specified in the update_mask are relative +// to the resource, not the full request. A field will be overwritten if +// it is in the mask. If the user does not provide a mask then all +// fields will be overwritten. +func (c *ProjectsLocationsBackupsPatchCall) UpdateMask(updateMask string) *ProjectsLocationsBackupsPatchCall { + c.urlParams_.Set("updateMask", updateMask) + return c +} + +// ValidateOnly sets the optional parameter "validateOnly": If set, the +// backend validates the request, but doesn't actually execute it. +func (c *ProjectsLocationsBackupsPatchCall) ValidateOnly(validateOnly bool) *ProjectsLocationsBackupsPatchCall { + 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 *ProjectsLocationsBackupsPatchCall) Fields(s ...googleapi.Field) *ProjectsLocationsBackupsPatchCall { + 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 *ProjectsLocationsBackupsPatchCall) Context(ctx context.Context) *ProjectsLocationsBackupsPatchCall { + 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 *ProjectsLocationsBackupsPatchCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsBackupsPatchCall) 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.backup) + 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 "alloydb.projects.locations.backups.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 *ProjectsLocationsBackupsPatchCall) Do(opts ...googleapi.CallOption) (*Operation, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, gensupport.WrapError(&googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + }) + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, gensupport.WrapError(err) + } + ret := &Operation{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Updates the parameters of a single Backup.", + // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/backups/{backupsId}", + // "httpMethod": "PATCH", + // "id": "alloydb.projects.locations.backups.patch", + // "parameterOrder": [ + // "name" + // ], + // "parameters": { + // "allowMissing": { + // "description": "Optional. If set to true, update succeeds even if instance is not found. In that case, a new backup is created and `update_mask` is ignored.", + // "location": "query", + // "type": "boolean" + // }, + // "name": { + // "description": "Output only. The name of the backup resource with the format: * projects/{project}/locations/{region}/backups/{backup_id} where the cluster and backup ID segments should satisfy the regex expression `[a-z]([a-z0-9-]{0,61}[a-z0-9])?`, e.g. 1-63 characters of lowercase letters, numbers, and dashes, starting with a letter, and ending with a letter or number. For more details see https://google.aip.dev/122. The prefix of the backup resource name is the name of the parent resource: * projects/{project}/locations/{region}", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+/backups/[^/]+$", + // "required": true, + // "type": "string" + // }, + // "requestId": { + // "description": "Optional. An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. The server will guarantee that for at least 60 minutes since the first request. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", + // "location": "query", + // "type": "string" + // }, + // "updateMask": { + // "description": "Optional. Field mask is used to specify the fields to be overwritten in the Backup resource by the update. The fields specified in the update_mask are relative to the resource, not the full request. A field will be overwritten if it is in the mask. If the user does not provide a mask then all fields will be overwritten.", + // "format": "google-fieldmask", + // "location": "query", + // "type": "string" + // }, + // "validateOnly": { + // "description": "Optional. If set, the backend validates the request, but doesn't actually execute it.", + // "location": "query", + // "type": "boolean" + // } + // }, + // "path": "v1/{+name}", + // "request": { + // "$ref": "Backup" + // }, + // "response": { + // "$ref": "Operation" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "alloydb.projects.locations.clusters.create": + +type ProjectsLocationsClustersCreateCall struct { + s *Service + parent string + cluster *Cluster + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Create: Creates a new Cluster in a given project and location. +// +// - parent: The location of the new cluster. For the required format, +// see the comment on the Cluster.name field. +func (r *ProjectsLocationsClustersService) Create(parent string, cluster *Cluster) *ProjectsLocationsClustersCreateCall { + c := &ProjectsLocationsClustersCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + c.cluster = cluster + return c +} + +// ClusterId sets the optional parameter "clusterId": Required. ID of +// the requesting object. +func (c *ProjectsLocationsClustersCreateCall) ClusterId(clusterId string) *ProjectsLocationsClustersCreateCall { + c.urlParams_.Set("clusterId", clusterId) + return c +} + +// RequestId sets the optional parameter "requestId": An optional +// request ID to identify requests. Specify a unique request ID so that +// if you must retry your request, the server will know to ignore the +// request if it has already been completed. The server will guarantee +// that for at least 60 minutes since the first request. For example, +// consider a situation where you make an initial request and the +// request times out. If you make the request again with the same +// request ID, the server can check if original operation with the same +// request ID was received, and if so, will ignore the second request. +// This prevents clients from accidentally creating duplicate +// commitments. The request ID must be a valid UUID with the exception +// that zero UUID is not supported +// (00000000-0000-0000-0000-000000000000). +func (c *ProjectsLocationsClustersCreateCall) RequestId(requestId string) *ProjectsLocationsClustersCreateCall { + c.urlParams_.Set("requestId", requestId) + return c +} + +// ValidateOnly sets the optional parameter "validateOnly": If set, +// performs request validation (e.g. permission checks and any other +// type of validation), but do not actually execute the create request. +func (c *ProjectsLocationsClustersCreateCall) ValidateOnly(validateOnly bool) *ProjectsLocationsClustersCreateCall { + 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 *ProjectsLocationsClustersCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsClustersCreateCall { + 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 *ProjectsLocationsClustersCreateCall) Context(ctx context.Context) *ProjectsLocationsClustersCreateCall { + 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 *ProjectsLocationsClustersCreateCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsClustersCreateCall) 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.cluster) + 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}/clusters") + 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 "alloydb.projects.locations.clusters.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 *ProjectsLocationsClustersCreateCall) Do(opts ...googleapi.CallOption) (*Operation, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, gensupport.WrapError(&googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + }) + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, gensupport.WrapError(err) + } + ret := &Operation{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Creates a new Cluster in a given project and location.", + // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/clusters", + // "httpMethod": "POST", + // "id": "alloydb.projects.locations.clusters.create", + // "parameterOrder": [ + // "parent" + // ], + // "parameters": { + // "clusterId": { + // "description": "Required. ID of the requesting object.", + // "location": "query", + // "type": "string" + // }, + // "parent": { + // "description": "Required. The location of the new cluster. For the required format, see the comment on the Cluster.name field.", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+$", + // "required": true, + // "type": "string" + // }, + // "requestId": { + // "description": "Optional. An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. The server will guarantee that for at least 60 minutes since the first request. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", + // "location": "query", + // "type": "string" + // }, + // "validateOnly": { + // "description": "Optional. If set, performs request validation (e.g. permission checks and any other type of validation), but do not actually execute the create request.", + // "location": "query", + // "type": "boolean" + // } + // }, + // "path": "v1/{+parent}/clusters", + // "request": { + // "$ref": "Cluster" + // }, + // "response": { + // "$ref": "Operation" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "alloydb.projects.locations.clusters.createsecondary": + +type ProjectsLocationsClustersCreatesecondaryCall struct { + s *Service + parent string + cluster *Cluster + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Createsecondary: Creates a cluster of type SECONDARY in the given +// location using the primary cluster as the source. +// +// - parent: The location of the new cluster. For the required format, +// see the comment on the Cluster.name field. +func (r *ProjectsLocationsClustersService) Createsecondary(parent string, cluster *Cluster) *ProjectsLocationsClustersCreatesecondaryCall { + c := &ProjectsLocationsClustersCreatesecondaryCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + c.cluster = cluster + return c +} + +// ClusterId sets the optional parameter "clusterId": Required. ID of +// the requesting object (the secondary cluster). +func (c *ProjectsLocationsClustersCreatesecondaryCall) ClusterId(clusterId string) *ProjectsLocationsClustersCreatesecondaryCall { + c.urlParams_.Set("clusterId", clusterId) + return c +} + +// RequestId sets the optional parameter "requestId": An optional +// request ID to identify requests. Specify a unique request ID so that +// if you must retry your request, the server will know to ignore the +// request if it has already been completed. The server will guarantee +// that for at least 60 minutes since the first request. For example, +// consider a situation where you make an initial request and the +// request times out. If you make the request again with the same +// request ID, the server can check if original operation with the same +// request ID was received, and if so, will ignore the second request. +// This prevents clients from accidentally creating duplicate +// commitments. The request ID must be a valid UUID with the exception +// that zero UUID is not supported +// (00000000-0000-0000-0000-000000000000). +func (c *ProjectsLocationsClustersCreatesecondaryCall) RequestId(requestId string) *ProjectsLocationsClustersCreatesecondaryCall { + c.urlParams_.Set("requestId", requestId) + return c +} + +// ValidateOnly sets the optional parameter "validateOnly": If set, +// performs request validation (e.g. permission checks and any other +// type of validation), but do not actually execute the create request. +func (c *ProjectsLocationsClustersCreatesecondaryCall) ValidateOnly(validateOnly bool) *ProjectsLocationsClustersCreatesecondaryCall { + 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 *ProjectsLocationsClustersCreatesecondaryCall) Fields(s ...googleapi.Field) *ProjectsLocationsClustersCreatesecondaryCall { + 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 *ProjectsLocationsClustersCreatesecondaryCall) Context(ctx context.Context) *ProjectsLocationsClustersCreatesecondaryCall { + 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 *ProjectsLocationsClustersCreatesecondaryCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsClustersCreatesecondaryCall) 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.cluster) + 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}/clusters:createsecondary") + 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 "alloydb.projects.locations.clusters.createsecondary" 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 *ProjectsLocationsClustersCreatesecondaryCall) Do(opts ...googleapi.CallOption) (*Operation, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, gensupport.WrapError(&googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + }) + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, gensupport.WrapError(err) + } + ret := &Operation{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Creates a cluster of type SECONDARY in the given location using the primary cluster as the source.", + // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/clusters:createsecondary", + // "httpMethod": "POST", + // "id": "alloydb.projects.locations.clusters.createsecondary", + // "parameterOrder": [ + // "parent" + // ], + // "parameters": { + // "clusterId": { + // "description": "Required. ID of the requesting object (the secondary cluster).", + // "location": "query", + // "type": "string" + // }, + // "parent": { + // "description": "Required. The location of the new cluster. For the required format, see the comment on the Cluster.name field.", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+$", + // "required": true, + // "type": "string" + // }, + // "requestId": { + // "description": "Optional. An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. The server will guarantee that for at least 60 minutes since the first request. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", + // "location": "query", + // "type": "string" + // }, + // "validateOnly": { + // "description": "Optional. If set, performs request validation (e.g. permission checks and any other type of validation), but do not actually execute the create request.", + // "location": "query", + // "type": "boolean" + // } + // }, + // "path": "v1/{+parent}/clusters:createsecondary", + // "request": { + // "$ref": "Cluster" + // }, + // "response": { + // "$ref": "Operation" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "alloydb.projects.locations.clusters.delete": + +type ProjectsLocationsClustersDeleteCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Delete: Deletes a single Cluster. +// +// - name: The name of the resource. For the required format, see the +// comment on the Cluster.name field. +func (r *ProjectsLocationsClustersService) Delete(name string) *ProjectsLocationsClustersDeleteCall { + c := &ProjectsLocationsClustersDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + return c +} + +// Etag sets the optional parameter "etag": The current etag of the +// Cluster. If an etag is provided and does not match the current etag +// of the Cluster, deletion will be blocked and an ABORTED error will be +// returned. +func (c *ProjectsLocationsClustersDeleteCall) Etag(etag string) *ProjectsLocationsClustersDeleteCall { + c.urlParams_.Set("etag", etag) + return c +} + +// Force sets the optional parameter "force": Whether to cascade delete +// child instances for given cluster. +func (c *ProjectsLocationsClustersDeleteCall) Force(force bool) *ProjectsLocationsClustersDeleteCall { + c.urlParams_.Set("force", fmt.Sprint(force)) + return c +} + +// RequestId sets the optional parameter "requestId": An optional +// request ID to identify requests. Specify a unique request ID so that +// if you must retry your request, the server will know to ignore the +// request if it has already been completed. The server will guarantee +// that for at least 60 minutes after the first request. For example, +// consider a situation where you make an initial request and the +// request times out. If you make the request again with the same +// request ID, the server can check if original operation with the same +// request ID was received, and if so, will ignore the second request. +// This prevents clients from accidentally creating duplicate +// commitments. The request ID must be a valid UUID with the exception +// that zero UUID is not supported +// (00000000-0000-0000-0000-000000000000). +func (c *ProjectsLocationsClustersDeleteCall) RequestId(requestId string) *ProjectsLocationsClustersDeleteCall { + c.urlParams_.Set("requestId", requestId) + return c +} + +// ValidateOnly sets the optional parameter "validateOnly": If set, +// performs request validation (e.g. permission checks and any other +// type of validation), but do not actually execute the delete. +func (c *ProjectsLocationsClustersDeleteCall) ValidateOnly(validateOnly bool) *ProjectsLocationsClustersDeleteCall { + 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 *ProjectsLocationsClustersDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsClustersDeleteCall { + 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 *ProjectsLocationsClustersDeleteCall) Context(ctx context.Context) *ProjectsLocationsClustersDeleteCall { + 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 *ProjectsLocationsClustersDeleteCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsClustersDeleteCall) 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 "alloydb.projects.locations.clusters.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 *ProjectsLocationsClustersDeleteCall) Do(opts ...googleapi.CallOption) (*Operation, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, gensupport.WrapError(&googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + }) + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, gensupport.WrapError(err) + } + ret := &Operation{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Deletes a single Cluster.", + // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/clusters/{clustersId}", + // "httpMethod": "DELETE", + // "id": "alloydb.projects.locations.clusters.delete", + // "parameterOrder": [ + // "name" + // ], + // "parameters": { + // "etag": { + // "description": "Optional. The current etag of the Cluster. If an etag is provided and does not match the current etag of the Cluster, deletion will be blocked and an ABORTED error will be returned.", + // "location": "query", + // "type": "string" + // }, + // "force": { + // "description": "Optional. Whether to cascade delete child instances for given cluster.", + // "location": "query", + // "type": "boolean" + // }, + // "name": { + // "description": "Required. The name of the resource. For the required format, see the comment on the Cluster.name field.", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+/clusters/[^/]+$", + // "required": true, + // "type": "string" + // }, + // "requestId": { + // "description": "Optional. An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. The server will guarantee that for at least 60 minutes after the first request. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", + // "location": "query", + // "type": "string" + // }, + // "validateOnly": { + // "description": "Optional. If set, performs request validation (e.g. permission checks and any other type of validation), but do not actually execute the delete.", + // "location": "query", + // "type": "boolean" + // } + // }, + // "path": "v1/{+name}", + // "response": { + // "$ref": "Operation" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "alloydb.projects.locations.clusters.get": + +type ProjectsLocationsClustersGetCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// Get: Gets details of a single Cluster. +// +// - name: The name of the resource. For the required format, see the +// comment on the Cluster.name field. +func (r *ProjectsLocationsClustersService) Get(name string) *ProjectsLocationsClustersGetCall { + c := &ProjectsLocationsClustersGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + return c +} + +// View sets the optional parameter "view": The view of the cluster to +// return. Returns all default fields if not set. +// +// Possible values: +// +// "CLUSTER_VIEW_UNSPECIFIED" - CLUSTER_VIEW_UNSPECIFIED Not +// +// specified, equivalent to BASIC. +// +// "CLUSTER_VIEW_BASIC" - BASIC server responses include all the +// +// relevant cluster details, excluding +// Cluster.ContinuousBackupInfo.EarliestRestorableTime and other +// view-specific fields. The default value. +// +// "CLUSTER_VIEW_CONTINUOUS_BACKUP" - CONTINUOUS_BACKUP response +// +// returns all the fields from BASIC plus the earliest restorable time +// if continuous backups are enabled. May increase latency. +func (c *ProjectsLocationsClustersGetCall) View(view string) *ProjectsLocationsClustersGetCall { + 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 *ProjectsLocationsClustersGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsClustersGetCall { + 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 *ProjectsLocationsClustersGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsClustersGetCall { + 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 *ProjectsLocationsClustersGetCall) Context(ctx context.Context) *ProjectsLocationsClustersGetCall { + 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 *ProjectsLocationsClustersGetCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsClustersGetCall) 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 "alloydb.projects.locations.clusters.get" call. +// Exactly one of *Cluster or error will be non-nil. Any non-2xx status +// code is an error. Response headers are in either +// *Cluster.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 *ProjectsLocationsClustersGetCall) Do(opts ...googleapi.CallOption) (*Cluster, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, gensupport.WrapError(&googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + }) + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, gensupport.WrapError(err) + } + ret := &Cluster{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Gets details of a single Cluster.", + // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/clusters/{clustersId}", + // "httpMethod": "GET", + // "id": "alloydb.projects.locations.clusters.get", + // "parameterOrder": [ + // "name" + // ], + // "parameters": { + // "name": { + // "description": "Required. The name of the resource. For the required format, see the comment on the Cluster.name field.", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+/clusters/[^/]+$", + // "required": true, + // "type": "string" + // }, + // "view": { + // "description": "Optional. The view of the cluster to return. Returns all default fields if not set.", + // "enum": [ + // "CLUSTER_VIEW_UNSPECIFIED", + // "CLUSTER_VIEW_BASIC", + // "CLUSTER_VIEW_CONTINUOUS_BACKUP" + // ], + // "enumDescriptions": [ + // "CLUSTER_VIEW_UNSPECIFIED Not specified, equivalent to BASIC.", + // "BASIC server responses include all the relevant cluster details, excluding Cluster.ContinuousBackupInfo.EarliestRestorableTime and other view-specific fields. The default value.", + // "CONTINUOUS_BACKUP response returns all the fields from BASIC plus the earliest restorable time if continuous backups are enabled. May increase latency." + // ], + // "location": "query", + // "type": "string" + // } + // }, + // "path": "v1/{+name}", + // "response": { + // "$ref": "Cluster" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "alloydb.projects.locations.clusters.list": + +type ProjectsLocationsClustersListCall struct { + s *Service + parent string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// List: Lists Clusters in a given project and location. +// +// - parent: The name of the parent resource. For the required format, +// see the comment on the Cluster.name field. Additionally, you can +// perform an aggregated list operation by specifying a value with the +// following format: * projects/{project}/locations/-. +func (r *ProjectsLocationsClustersService) List(parent string) *ProjectsLocationsClustersListCall { + c := &ProjectsLocationsClustersListCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + return c +} + +// Filter sets the optional parameter "filter": Filtering results +func (c *ProjectsLocationsClustersListCall) Filter(filter string) *ProjectsLocationsClustersListCall { + c.urlParams_.Set("filter", filter) + return c +} + +// OrderBy sets the optional parameter "orderBy": Hint for how to order +// the results +func (c *ProjectsLocationsClustersListCall) OrderBy(orderBy string) *ProjectsLocationsClustersListCall { + c.urlParams_.Set("orderBy", orderBy) + return c +} + +// PageSize sets the optional parameter "pageSize": Requested page size. +// Server may return fewer items than requested. If unspecified, server +// will pick an appropriate default. +func (c *ProjectsLocationsClustersListCall) PageSize(pageSize int64) *ProjectsLocationsClustersListCall { + c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) + return c +} + +// PageToken sets the optional parameter "pageToken": A token +// identifying a page of results the server should return. +func (c *ProjectsLocationsClustersListCall) PageToken(pageToken string) *ProjectsLocationsClustersListCall { + 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 *ProjectsLocationsClustersListCall) Fields(s ...googleapi.Field) *ProjectsLocationsClustersListCall { + 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 *ProjectsLocationsClustersListCall) IfNoneMatch(entityTag string) *ProjectsLocationsClustersListCall { + 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 *ProjectsLocationsClustersListCall) Context(ctx context.Context) *ProjectsLocationsClustersListCall { + 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 *ProjectsLocationsClustersListCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsClustersListCall) 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}/clusters") + 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 "alloydb.projects.locations.clusters.list" call. +// Exactly one of *ListClustersResponse or error will be non-nil. Any +// non-2xx status code is an error. Response headers are in either +// *ListClustersResponse.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 *ProjectsLocationsClustersListCall) Do(opts ...googleapi.CallOption) (*ListClustersResponse, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, gensupport.WrapError(&googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + }) + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, gensupport.WrapError(err) + } + ret := &ListClustersResponse{ + 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 Clusters in a given project and location.", + // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/clusters", + // "httpMethod": "GET", + // "id": "alloydb.projects.locations.clusters.list", + // "parameterOrder": [ + // "parent" + // ], + // "parameters": { + // "filter": { + // "description": "Optional. Filtering results", + // "location": "query", + // "type": "string" + // }, + // "orderBy": { + // "description": "Optional. Hint for how to order the results", + // "location": "query", + // "type": "string" + // }, + // "pageSize": { + // "description": "Optional. Requested page size. Server may return fewer items than requested. If unspecified, server will pick an appropriate default.", + // "format": "int32", + // "location": "query", + // "type": "integer" + // }, + // "pageToken": { + // "description": "A token identifying a page of results the server should return.", + // "location": "query", + // "type": "string" + // }, + // "parent": { + // "description": "Required. The name of the parent resource. For the required format, see the comment on the Cluster.name field. Additionally, you can perform an aggregated list operation by specifying a value with the following format: * projects/{project}/locations/-", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1/{+parent}/clusters", + // "response": { + // "$ref": "ListClustersResponse" + // }, + // "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 *ProjectsLocationsClustersListCall) Pages(ctx context.Context, f func(*ListClustersResponse) 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 "alloydb.projects.locations.clusters.patch": + +type ProjectsLocationsClustersPatchCall struct { + s *Service + name string + cluster *Cluster + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Patch: Updates the parameters of a single Cluster. +// +// - name: Output only. The name of the cluster resource with the +// format: * +// projects/{project}/locations/{region}/clusters/{cluster_id} where +// the cluster ID segment should satisfy the regex expression +// `[a-z0-9-]+`. For more details see https://google.aip.dev/122. The +// prefix of the cluster resource name is the name of the parent +// resource: * projects/{project}/locations/{region}. +func (r *ProjectsLocationsClustersService) Patch(name string, cluster *Cluster) *ProjectsLocationsClustersPatchCall { + c := &ProjectsLocationsClustersPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + c.cluster = cluster + return c +} + +// AllowMissing sets the optional parameter "allowMissing": If set to +// true, update succeeds even if cluster is not found. In that case, a +// new cluster is created and `update_mask` is ignored. +func (c *ProjectsLocationsClustersPatchCall) AllowMissing(allowMissing bool) *ProjectsLocationsClustersPatchCall { + c.urlParams_.Set("allowMissing", fmt.Sprint(allowMissing)) + return c +} + +// RequestId sets the optional parameter "requestId": An optional +// request ID to identify requests. Specify a unique request ID so that +// if you must retry your request, the server will know to ignore the +// request if it has already been completed. The server will guarantee +// that for at least 60 minutes since the first request. For example, +// consider a situation where you make an initial request and the +// request times out. If you make the request again with the same +// request ID, the server can check if original operation with the same +// request ID was received, and if so, will ignore the second request. +// This prevents clients from accidentally creating duplicate +// commitments. The request ID must be a valid UUID with the exception +// that zero UUID is not supported +// (00000000-0000-0000-0000-000000000000). +func (c *ProjectsLocationsClustersPatchCall) RequestId(requestId string) *ProjectsLocationsClustersPatchCall { + c.urlParams_.Set("requestId", requestId) + return c +} + +// UpdateMask sets the optional parameter "updateMask": Field mask is +// used to specify the fields to be overwritten in the Cluster resource +// by the update. The fields specified in the update_mask are relative +// to the resource, not the full request. A field will be overwritten if +// it is in the mask. If the user does not provide a mask then all +// fields will be overwritten. +func (c *ProjectsLocationsClustersPatchCall) UpdateMask(updateMask string) *ProjectsLocationsClustersPatchCall { + c.urlParams_.Set("updateMask", updateMask) + return c +} + +// ValidateOnly sets the optional parameter "validateOnly": If set, +// performs request validation (e.g. permission checks and any other +// type of validation), but do not actually execute the update request. +func (c *ProjectsLocationsClustersPatchCall) ValidateOnly(validateOnly bool) *ProjectsLocationsClustersPatchCall { + 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 *ProjectsLocationsClustersPatchCall) Fields(s ...googleapi.Field) *ProjectsLocationsClustersPatchCall { + 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 *ProjectsLocationsClustersPatchCall) Context(ctx context.Context) *ProjectsLocationsClustersPatchCall { + 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 *ProjectsLocationsClustersPatchCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsClustersPatchCall) 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.cluster) + 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 "alloydb.projects.locations.clusters.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 *ProjectsLocationsClustersPatchCall) Do(opts ...googleapi.CallOption) (*Operation, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, gensupport.WrapError(&googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + }) + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, gensupport.WrapError(err) + } + ret := &Operation{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Updates the parameters of a single Cluster.", + // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/clusters/{clustersId}", + // "httpMethod": "PATCH", + // "id": "alloydb.projects.locations.clusters.patch", + // "parameterOrder": [ + // "name" + // ], + // "parameters": { + // "allowMissing": { + // "description": "Optional. If set to true, update succeeds even if cluster is not found. In that case, a new cluster is created and `update_mask` is ignored.", + // "location": "query", + // "type": "boolean" + // }, + // "name": { + // "description": "Output only. The name of the cluster resource with the format: * projects/{project}/locations/{region}/clusters/{cluster_id} where the cluster ID segment should satisfy the regex expression `[a-z0-9-]+`. For more details see https://google.aip.dev/122. The prefix of the cluster resource name is the name of the parent resource: * projects/{project}/locations/{region}", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+/clusters/[^/]+$", + // "required": true, + // "type": "string" + // }, + // "requestId": { + // "description": "Optional. An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. The server will guarantee that for at least 60 minutes since the first request. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", + // "location": "query", + // "type": "string" + // }, + // "updateMask": { + // "description": "Optional. Field mask is used to specify the fields to be overwritten in the Cluster resource by the update. The fields specified in the update_mask are relative to the resource, not the full request. A field will be overwritten if it is in the mask. If the user does not provide a mask then all fields will be overwritten.", + // "format": "google-fieldmask", + // "location": "query", + // "type": "string" + // }, + // "validateOnly": { + // "description": "Optional. If set, performs request validation (e.g. permission checks and any other type of validation), but do not actually execute the update request.", + // "location": "query", + // "type": "boolean" + // } + // }, + // "path": "v1/{+name}", + // "request": { + // "$ref": "Cluster" + // }, + // "response": { + // "$ref": "Operation" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "alloydb.projects.locations.clusters.promote": + +type ProjectsLocationsClustersPromoteCall struct { + s *Service + name string + promoteclusterrequest *PromoteClusterRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Promote: Promotes a SECONDARY cluster. This turns down replication +// from the PRIMARY cluster and promotes a secondary cluster into its +// own standalone cluster. Imperative only. +// +// - name: The name of the resource. For the required format, see the +// comment on the Cluster.name field. +func (r *ProjectsLocationsClustersService) Promote(name string, promoteclusterrequest *PromoteClusterRequest) *ProjectsLocationsClustersPromoteCall { + c := &ProjectsLocationsClustersPromoteCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + c.promoteclusterrequest = promoteclusterrequest + 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 *ProjectsLocationsClustersPromoteCall) Fields(s ...googleapi.Field) *ProjectsLocationsClustersPromoteCall { + 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 *ProjectsLocationsClustersPromoteCall) Context(ctx context.Context) *ProjectsLocationsClustersPromoteCall { + 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 *ProjectsLocationsClustersPromoteCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsClustersPromoteCall) 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.promoteclusterrequest) + 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}:promote") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("POST", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "name": c.name, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "alloydb.projects.locations.clusters.promote" 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 *ProjectsLocationsClustersPromoteCall) Do(opts ...googleapi.CallOption) (*Operation, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, gensupport.WrapError(&googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + }) + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, gensupport.WrapError(err) + } + ret := &Operation{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Promotes a SECONDARY cluster. This turns down replication from the PRIMARY cluster and promotes a secondary cluster into its own standalone cluster. Imperative only.", + // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/clusters/{clustersId}:promote", + // "httpMethod": "POST", + // "id": "alloydb.projects.locations.clusters.promote", + // "parameterOrder": [ + // "name" + // ], + // "parameters": { + // "name": { + // "description": "Required. The name of the resource. For the required format, see the comment on the Cluster.name field", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+/clusters/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1/{+name}:promote", + // "request": { + // "$ref": "PromoteClusterRequest" + // }, + // "response": { + // "$ref": "Operation" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "alloydb.projects.locations.clusters.restore": + +type ProjectsLocationsClustersRestoreCall struct { + s *Service + parent string + restoreclusterrequest *RestoreClusterRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Restore: Creates a new Cluster in a given project and location, with +// a volume restored from the provided source, either a backup ID or a +// point-in-time and a source cluster. +// +// - parent: The name of the parent resource. For the required format, +// see the comment on the Cluster.name field. +func (r *ProjectsLocationsClustersService) Restore(parent string, restoreclusterrequest *RestoreClusterRequest) *ProjectsLocationsClustersRestoreCall { + c := &ProjectsLocationsClustersRestoreCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + c.restoreclusterrequest = restoreclusterrequest + 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 *ProjectsLocationsClustersRestoreCall) Fields(s ...googleapi.Field) *ProjectsLocationsClustersRestoreCall { + 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 *ProjectsLocationsClustersRestoreCall) Context(ctx context.Context) *ProjectsLocationsClustersRestoreCall { + 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 *ProjectsLocationsClustersRestoreCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsClustersRestoreCall) 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.restoreclusterrequest) + 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}/clusters:restore") + 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 "alloydb.projects.locations.clusters.restore" 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 *ProjectsLocationsClustersRestoreCall) Do(opts ...googleapi.CallOption) (*Operation, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, gensupport.WrapError(&googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + }) + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, gensupport.WrapError(err) + } + ret := &Operation{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Creates a new Cluster in a given project and location, with a volume restored from the provided source, either a backup ID or a point-in-time and a source cluster.", + // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/clusters:restore", + // "httpMethod": "POST", + // "id": "alloydb.projects.locations.clusters.restore", + // "parameterOrder": [ + // "parent" + // ], + // "parameters": { + // "parent": { + // "description": "Required. The name of the parent resource. For the required format, see the comment on the Cluster.name field.", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1/{+parent}/clusters:restore", + // "request": { + // "$ref": "RestoreClusterRequest" + // }, + // "response": { + // "$ref": "Operation" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "alloydb.projects.locations.clusters.instances.create": + +type ProjectsLocationsClustersInstancesCreateCall struct { + s *Service + parent string + instance *Instance + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Create: Creates a new Instance in a given project and location. +// +// - parent: The name of the parent resource. For the required format, +// see the comment on the Instance.name field. +func (r *ProjectsLocationsClustersInstancesService) Create(parent string, instance *Instance) *ProjectsLocationsClustersInstancesCreateCall { + c := &ProjectsLocationsClustersInstancesCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + c.instance = instance + return c +} + +// InstanceId sets the optional parameter "instanceId": Required. ID of +// the requesting object. +func (c *ProjectsLocationsClustersInstancesCreateCall) InstanceId(instanceId string) *ProjectsLocationsClustersInstancesCreateCall { + c.urlParams_.Set("instanceId", instanceId) + return c +} + +// RequestId sets the optional parameter "requestId": An optional +// request ID to identify requests. Specify a unique request ID so that +// if you must retry your request, the server will know to ignore the +// request if it has already been completed. The server will guarantee +// that for at least 60 minutes since the first request. For example, +// consider a situation where you make an initial request and the +// request times out. If you make the request again with the same +// request ID, the server can check if original operation with the same +// request ID was received, and if so, will ignore the second request. +// This prevents clients from accidentally creating duplicate +// commitments. The request ID must be a valid UUID with the exception +// that zero UUID is not supported +// (00000000-0000-0000-0000-000000000000). +func (c *ProjectsLocationsClustersInstancesCreateCall) RequestId(requestId string) *ProjectsLocationsClustersInstancesCreateCall { + c.urlParams_.Set("requestId", requestId) + return c +} + +// ValidateOnly sets the optional parameter "validateOnly": If set, +// performs request validation (e.g. permission checks and any other +// type of validation), but do not actually execute the create request. +func (c *ProjectsLocationsClustersInstancesCreateCall) ValidateOnly(validateOnly bool) *ProjectsLocationsClustersInstancesCreateCall { + 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 *ProjectsLocationsClustersInstancesCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsClustersInstancesCreateCall { + 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 *ProjectsLocationsClustersInstancesCreateCall) Context(ctx context.Context) *ProjectsLocationsClustersInstancesCreateCall { + 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 *ProjectsLocationsClustersInstancesCreateCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsClustersInstancesCreateCall) 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.instance) + 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}/instances") + 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 "alloydb.projects.locations.clusters.instances.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 *ProjectsLocationsClustersInstancesCreateCall) Do(opts ...googleapi.CallOption) (*Operation, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, gensupport.WrapError(&googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + }) + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, gensupport.WrapError(err) + } + ret := &Operation{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Creates a new Instance in a given project and location.", + // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/clusters/{clustersId}/instances", + // "httpMethod": "POST", + // "id": "alloydb.projects.locations.clusters.instances.create", + // "parameterOrder": [ + // "parent" + // ], + // "parameters": { + // "instanceId": { + // "description": "Required. ID of the requesting object.", + // "location": "query", + // "type": "string" + // }, + // "parent": { + // "description": "Required. The name of the parent resource. For the required format, see the comment on the Instance.name field.", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+/clusters/[^/]+$", + // "required": true, + // "type": "string" + // }, + // "requestId": { + // "description": "Optional. An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. The server will guarantee that for at least 60 minutes since the first request. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", + // "location": "query", + // "type": "string" + // }, + // "validateOnly": { + // "description": "Optional. If set, performs request validation (e.g. permission checks and any other type of validation), but do not actually execute the create request.", + // "location": "query", + // "type": "boolean" + // } + // }, + // "path": "v1/{+parent}/instances", + // "request": { + // "$ref": "Instance" + // }, + // "response": { + // "$ref": "Operation" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "alloydb.projects.locations.clusters.instances.createsecondary": + +type ProjectsLocationsClustersInstancesCreatesecondaryCall struct { + s *Service + parent string + instance *Instance + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Createsecondary: Creates a new SECONDARY Instance in a given project +// and location. +// +// - parent: The name of the parent resource. For the required format, +// see the comment on the Instance.name field. +func (r *ProjectsLocationsClustersInstancesService) Createsecondary(parent string, instance *Instance) *ProjectsLocationsClustersInstancesCreatesecondaryCall { + c := &ProjectsLocationsClustersInstancesCreatesecondaryCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + c.instance = instance + return c +} + +// InstanceId sets the optional parameter "instanceId": Required. ID of +// the requesting object. +func (c *ProjectsLocationsClustersInstancesCreatesecondaryCall) InstanceId(instanceId string) *ProjectsLocationsClustersInstancesCreatesecondaryCall { + c.urlParams_.Set("instanceId", instanceId) + return c +} + +// RequestId sets the optional parameter "requestId": An optional +// request ID to identify requests. Specify a unique request ID so that +// if you must retry your request, the server will know to ignore the +// request if it has already been completed. The server will guarantee +// that for at least 60 minutes since the first request. For example, +// consider a situation where you make an initial request and the +// request times out. If you make the request again with the same +// request ID, the server can check if original operation with the same +// request ID was received, and if so, will ignore the second request. +// This prevents clients from accidentally creating duplicate +// commitments. The request ID must be a valid UUID with the exception +// that zero UUID is not supported +// (00000000-0000-0000-0000-000000000000). +func (c *ProjectsLocationsClustersInstancesCreatesecondaryCall) RequestId(requestId string) *ProjectsLocationsClustersInstancesCreatesecondaryCall { + c.urlParams_.Set("requestId", requestId) + return c +} + +// ValidateOnly sets the optional parameter "validateOnly": If set, +// performs request validation (e.g. permission checks and any other +// type of validation), but do not actually execute the create request. +func (c *ProjectsLocationsClustersInstancesCreatesecondaryCall) ValidateOnly(validateOnly bool) *ProjectsLocationsClustersInstancesCreatesecondaryCall { + 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 *ProjectsLocationsClustersInstancesCreatesecondaryCall) Fields(s ...googleapi.Field) *ProjectsLocationsClustersInstancesCreatesecondaryCall { + 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 *ProjectsLocationsClustersInstancesCreatesecondaryCall) Context(ctx context.Context) *ProjectsLocationsClustersInstancesCreatesecondaryCall { + 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 *ProjectsLocationsClustersInstancesCreatesecondaryCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsClustersInstancesCreatesecondaryCall) 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.instance) + 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}/instances:createsecondary") + 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 "alloydb.projects.locations.clusters.instances.createsecondary" 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 *ProjectsLocationsClustersInstancesCreatesecondaryCall) Do(opts ...googleapi.CallOption) (*Operation, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, gensupport.WrapError(&googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + }) + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, gensupport.WrapError(err) + } + ret := &Operation{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Creates a new SECONDARY Instance in a given project and location.", + // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/clusters/{clustersId}/instances:createsecondary", + // "httpMethod": "POST", + // "id": "alloydb.projects.locations.clusters.instances.createsecondary", + // "parameterOrder": [ + // "parent" + // ], + // "parameters": { + // "instanceId": { + // "description": "Required. ID of the requesting object.", + // "location": "query", + // "type": "string" + // }, + // "parent": { + // "description": "Required. The name of the parent resource. For the required format, see the comment on the Instance.name field.", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+/clusters/[^/]+$", + // "required": true, + // "type": "string" + // }, + // "requestId": { + // "description": "Optional. An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. The server will guarantee that for at least 60 minutes since the first request. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", + // "location": "query", + // "type": "string" + // }, + // "validateOnly": { + // "description": "Optional. If set, performs request validation (e.g. permission checks and any other type of validation), but do not actually execute the create request.", + // "location": "query", + // "type": "boolean" + // } + // }, + // "path": "v1/{+parent}/instances:createsecondary", + // "request": { + // "$ref": "Instance" + // }, + // "response": { + // "$ref": "Operation" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "alloydb.projects.locations.clusters.instances.delete": + +type ProjectsLocationsClustersInstancesDeleteCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Delete: Deletes a single Instance. +// +// - name: The name of the resource. For the required format, see the +// comment on the Instance.name field. +func (r *ProjectsLocationsClustersInstancesService) Delete(name string) *ProjectsLocationsClustersInstancesDeleteCall { + c := &ProjectsLocationsClustersInstancesDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + return c +} + +// Etag sets the optional parameter "etag": The current etag of the +// Instance. If an etag is provided and does not match the current etag +// of the Instance, deletion will be blocked and an ABORTED error will +// be returned. +func (c *ProjectsLocationsClustersInstancesDeleteCall) Etag(etag string) *ProjectsLocationsClustersInstancesDeleteCall { + c.urlParams_.Set("etag", etag) + return c +} + +// RequestId sets the optional parameter "requestId": An optional +// request ID to identify requests. Specify a unique request ID so that +// if you must retry your request, the server will know to ignore the +// request if it has already been completed. The server will guarantee +// that for at least 60 minutes after the first request. For example, +// consider a situation where you make an initial request and the +// request times out. If you make the request again with the same +// request ID, the server can check if original operation with the same +// request ID was received, and if so, will ignore the second request. +// This prevents clients from accidentally creating duplicate +// commitments. The request ID must be a valid UUID with the exception +// that zero UUID is not supported +// (00000000-0000-0000-0000-000000000000). +func (c *ProjectsLocationsClustersInstancesDeleteCall) RequestId(requestId string) *ProjectsLocationsClustersInstancesDeleteCall { + c.urlParams_.Set("requestId", requestId) + return c +} + +// ValidateOnly sets the optional parameter "validateOnly": If set, +// performs request validation (e.g. permission checks and any other +// type of validation), but do not actually execute the delete. +func (c *ProjectsLocationsClustersInstancesDeleteCall) ValidateOnly(validateOnly bool) *ProjectsLocationsClustersInstancesDeleteCall { + 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 *ProjectsLocationsClustersInstancesDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsClustersInstancesDeleteCall { + 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 *ProjectsLocationsClustersInstancesDeleteCall) Context(ctx context.Context) *ProjectsLocationsClustersInstancesDeleteCall { + 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 *ProjectsLocationsClustersInstancesDeleteCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsClustersInstancesDeleteCall) 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 "alloydb.projects.locations.clusters.instances.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 *ProjectsLocationsClustersInstancesDeleteCall) Do(opts ...googleapi.CallOption) (*Operation, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, gensupport.WrapError(&googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + }) + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, gensupport.WrapError(err) + } + ret := &Operation{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Deletes a single Instance.", + // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/clusters/{clustersId}/instances/{instancesId}", + // "httpMethod": "DELETE", + // "id": "alloydb.projects.locations.clusters.instances.delete", + // "parameterOrder": [ + // "name" + // ], + // "parameters": { + // "etag": { + // "description": "Optional. The current etag of the Instance. If an etag is provided and does not match the current etag of the Instance, deletion will be blocked and an ABORTED error will be returned.", + // "location": "query", + // "type": "string" + // }, + // "name": { + // "description": "Required. The name of the resource. For the required format, see the comment on the Instance.name field.", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+/clusters/[^/]+/instances/[^/]+$", + // "required": true, + // "type": "string" + // }, + // "requestId": { + // "description": "Optional. An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. The server will guarantee that for at least 60 minutes after the first request. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", + // "location": "query", + // "type": "string" + // }, + // "validateOnly": { + // "description": "Optional. If set, performs request validation (e.g. permission checks and any other type of validation), but do not actually execute the delete.", + // "location": "query", + // "type": "boolean" + // } + // }, + // "path": "v1/{+name}", + // "response": { + // "$ref": "Operation" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "alloydb.projects.locations.clusters.instances.failover": + +type ProjectsLocationsClustersInstancesFailoverCall struct { + s *Service + name string + failoverinstancerequest *FailoverInstanceRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Failover: Forces a Failover for a highly available instance. Failover +// promotes the HA standby instance as the new primary. Imperative only. +// +// - name: The name of the resource. For the required format, see the +// comment on the Instance.name field. +func (r *ProjectsLocationsClustersInstancesService) Failover(name string, failoverinstancerequest *FailoverInstanceRequest) *ProjectsLocationsClustersInstancesFailoverCall { + c := &ProjectsLocationsClustersInstancesFailoverCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + c.failoverinstancerequest = failoverinstancerequest + 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 *ProjectsLocationsClustersInstancesFailoverCall) Fields(s ...googleapi.Field) *ProjectsLocationsClustersInstancesFailoverCall { + 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 *ProjectsLocationsClustersInstancesFailoverCall) Context(ctx context.Context) *ProjectsLocationsClustersInstancesFailoverCall { + 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 *ProjectsLocationsClustersInstancesFailoverCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsClustersInstancesFailoverCall) 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.failoverinstancerequest) + 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}:failover") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("POST", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "name": c.name, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "alloydb.projects.locations.clusters.instances.failover" 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 *ProjectsLocationsClustersInstancesFailoverCall) Do(opts ...googleapi.CallOption) (*Operation, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, gensupport.WrapError(&googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + }) + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, gensupport.WrapError(err) + } + ret := &Operation{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Forces a Failover for a highly available instance. Failover promotes the HA standby instance as the new primary. Imperative only.", + // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/clusters/{clustersId}/instances/{instancesId}:failover", + // "httpMethod": "POST", + // "id": "alloydb.projects.locations.clusters.instances.failover", + // "parameterOrder": [ + // "name" + // ], + // "parameters": { + // "name": { + // "description": "Required. The name of the resource. For the required format, see the comment on the Instance.name field.", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+/clusters/[^/]+/instances/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1/{+name}:failover", + // "request": { + // "$ref": "FailoverInstanceRequest" + // }, + // "response": { + // "$ref": "Operation" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "alloydb.projects.locations.clusters.instances.get": + +type ProjectsLocationsClustersInstancesGetCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// Get: Gets details of a single Instance. +// +// - name: The name of the resource. For the required format, see the +// comment on the Instance.name field. +func (r *ProjectsLocationsClustersInstancesService) Get(name string) *ProjectsLocationsClustersInstancesGetCall { + c := &ProjectsLocationsClustersInstancesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + return c +} + +// View sets the optional parameter "view": The view of the instance to +// return. +// +// Possible values: +// +// "INSTANCE_VIEW_UNSPECIFIED" - INSTANCE_VIEW_UNSPECIFIED Not +// +// specified, equivalent to BASIC. +// +// "INSTANCE_VIEW_BASIC" - BASIC server responses for a primary or +// +// read instance include all the relevant instance details, excluding +// the details of each node in the instance. The default value. +// +// "INSTANCE_VIEW_FULL" - FULL response is equivalent to BASIC for +// +// primary instance (for now). For read pool instance, this includes +// details of each node in the pool. +func (c *ProjectsLocationsClustersInstancesGetCall) View(view string) *ProjectsLocationsClustersInstancesGetCall { + 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 *ProjectsLocationsClustersInstancesGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsClustersInstancesGetCall { + 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 *ProjectsLocationsClustersInstancesGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsClustersInstancesGetCall { + 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 *ProjectsLocationsClustersInstancesGetCall) Context(ctx context.Context) *ProjectsLocationsClustersInstancesGetCall { + 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 *ProjectsLocationsClustersInstancesGetCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsClustersInstancesGetCall) 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 "alloydb.projects.locations.clusters.instances.get" call. +// Exactly one of *Instance or error will be non-nil. Any non-2xx status +// code is an error. Response headers are in either +// *Instance.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 *ProjectsLocationsClustersInstancesGetCall) Do(opts ...googleapi.CallOption) (*Instance, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, gensupport.WrapError(&googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + }) + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, gensupport.WrapError(err) + } + ret := &Instance{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Gets details of a single Instance.", + // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/clusters/{clustersId}/instances/{instancesId}", + // "httpMethod": "GET", + // "id": "alloydb.projects.locations.clusters.instances.get", + // "parameterOrder": [ + // "name" + // ], + // "parameters": { + // "name": { + // "description": "Required. The name of the resource. For the required format, see the comment on the Instance.name field.", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+/clusters/[^/]+/instances/[^/]+$", + // "required": true, + // "type": "string" + // }, + // "view": { + // "description": "The view of the instance to return.", + // "enum": [ + // "INSTANCE_VIEW_UNSPECIFIED", + // "INSTANCE_VIEW_BASIC", + // "INSTANCE_VIEW_FULL" + // ], + // "enumDescriptions": [ + // "INSTANCE_VIEW_UNSPECIFIED Not specified, equivalent to BASIC.", + // "BASIC server responses for a primary or read instance include all the relevant instance details, excluding the details of each node in the instance. The default value.", + // "FULL response is equivalent to BASIC for primary instance (for now). For read pool instance, this includes details of each node in the pool." + // ], + // "location": "query", + // "type": "string" + // } + // }, + // "path": "v1/{+name}", + // "response": { + // "$ref": "Instance" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "alloydb.projects.locations.clusters.instances.injectFault": + +type ProjectsLocationsClustersInstancesInjectFaultCall struct { + s *Service + name string + injectfaultrequest *InjectFaultRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// InjectFault: Injects fault in an instance. Imperative only. +// +// - name: The name of the resource. For the required format, see the +// comment on the Instance.name field. +func (r *ProjectsLocationsClustersInstancesService) InjectFault(name string, injectfaultrequest *InjectFaultRequest) *ProjectsLocationsClustersInstancesInjectFaultCall { + c := &ProjectsLocationsClustersInstancesInjectFaultCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + c.injectfaultrequest = injectfaultrequest + 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 *ProjectsLocationsClustersInstancesInjectFaultCall) Fields(s ...googleapi.Field) *ProjectsLocationsClustersInstancesInjectFaultCall { + 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 *ProjectsLocationsClustersInstancesInjectFaultCall) Context(ctx context.Context) *ProjectsLocationsClustersInstancesInjectFaultCall { + 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 *ProjectsLocationsClustersInstancesInjectFaultCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsClustersInstancesInjectFaultCall) 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.injectfaultrequest) + 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}:injectFault") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("POST", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "name": c.name, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "alloydb.projects.locations.clusters.instances.injectFault" 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 *ProjectsLocationsClustersInstancesInjectFaultCall) Do(opts ...googleapi.CallOption) (*Operation, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, gensupport.WrapError(&googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + }) + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, gensupport.WrapError(err) + } + ret := &Operation{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Injects fault in an instance. Imperative only.", + // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/clusters/{clustersId}/instances/{instancesId}:injectFault", + // "httpMethod": "POST", + // "id": "alloydb.projects.locations.clusters.instances.injectFault", + // "parameterOrder": [ + // "name" + // ], + // "parameters": { + // "name": { + // "description": "Required. The name of the resource. For the required format, see the comment on the Instance.name field.", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+/clusters/[^/]+/instances/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1/{+name}:injectFault", + // "request": { + // "$ref": "InjectFaultRequest" + // }, + // "response": { + // "$ref": "Operation" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "alloydb.projects.locations.clusters.instances.list": + +type ProjectsLocationsClustersInstancesListCall struct { + s *Service + parent string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// List: Lists Instances in a given project and location. +// +// - parent: The name of the parent resource. For the required format, +// see the comment on the Instance.name field. Additionally, you can +// perform an aggregated list operation by specifying a value with one +// of the following formats: * +// projects/{project}/locations/-/clusters/- * +// projects/{project}/locations/{region}/clusters/-. +func (r *ProjectsLocationsClustersInstancesService) List(parent string) *ProjectsLocationsClustersInstancesListCall { + c := &ProjectsLocationsClustersInstancesListCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + return c +} + +// Filter sets the optional parameter "filter": Filtering results +func (c *ProjectsLocationsClustersInstancesListCall) Filter(filter string) *ProjectsLocationsClustersInstancesListCall { + c.urlParams_.Set("filter", filter) + return c +} + +// OrderBy sets the optional parameter "orderBy": Hint for how to order +// the results +func (c *ProjectsLocationsClustersInstancesListCall) OrderBy(orderBy string) *ProjectsLocationsClustersInstancesListCall { + c.urlParams_.Set("orderBy", orderBy) + return c +} + +// PageSize sets the optional parameter "pageSize": Requested page size. +// Server may return fewer items than requested. If unspecified, server +// will pick an appropriate default. +func (c *ProjectsLocationsClustersInstancesListCall) PageSize(pageSize int64) *ProjectsLocationsClustersInstancesListCall { + c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) + return c +} + +// PageToken sets the optional parameter "pageToken": A token +// identifying a page of results the server should return. +func (c *ProjectsLocationsClustersInstancesListCall) PageToken(pageToken string) *ProjectsLocationsClustersInstancesListCall { + 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 *ProjectsLocationsClustersInstancesListCall) Fields(s ...googleapi.Field) *ProjectsLocationsClustersInstancesListCall { + 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 *ProjectsLocationsClustersInstancesListCall) IfNoneMatch(entityTag string) *ProjectsLocationsClustersInstancesListCall { + 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 *ProjectsLocationsClustersInstancesListCall) Context(ctx context.Context) *ProjectsLocationsClustersInstancesListCall { + 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 *ProjectsLocationsClustersInstancesListCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsClustersInstancesListCall) 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}/instances") + 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 "alloydb.projects.locations.clusters.instances.list" call. +// Exactly one of *ListInstancesResponse or error will be non-nil. Any +// non-2xx status code is an error. Response headers are in either +// *ListInstancesResponse.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 *ProjectsLocationsClustersInstancesListCall) Do(opts ...googleapi.CallOption) (*ListInstancesResponse, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, gensupport.WrapError(&googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + }) + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, gensupport.WrapError(err) + } + ret := &ListInstancesResponse{ + 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 Instances in a given project and location.", + // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/clusters/{clustersId}/instances", + // "httpMethod": "GET", + // "id": "alloydb.projects.locations.clusters.instances.list", + // "parameterOrder": [ + // "parent" + // ], + // "parameters": { + // "filter": { + // "description": "Optional. Filtering results", + // "location": "query", + // "type": "string" + // }, + // "orderBy": { + // "description": "Optional. Hint for how to order the results", + // "location": "query", + // "type": "string" + // }, + // "pageSize": { + // "description": "Optional. Requested page size. Server may return fewer items than requested. If unspecified, server will pick an appropriate default.", + // "format": "int32", + // "location": "query", + // "type": "integer" + // }, + // "pageToken": { + // "description": "A token identifying a page of results the server should return.", + // "location": "query", + // "type": "string" + // }, + // "parent": { + // "description": "Required. The name of the parent resource. For the required format, see the comment on the Instance.name field. Additionally, you can perform an aggregated list operation by specifying a value with one of the following formats: * projects/{project}/locations/-/clusters/- * projects/{project}/locations/{region}/clusters/-", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+/clusters/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1/{+parent}/instances", + // "response": { + // "$ref": "ListInstancesResponse" + // }, + // "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 *ProjectsLocationsClustersInstancesListCall) Pages(ctx context.Context, f func(*ListInstancesResponse) 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 "alloydb.projects.locations.clusters.instances.patch": + +type ProjectsLocationsClustersInstancesPatchCall struct { + s *Service + name string + instance *Instance + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Patch: Updates the parameters of a single Instance. +// +// - name: Output only. The name of the instance resource with the +// format: * +// projects/{project}/locations/{region}/clusters/{cluster_id}/instance +// s/{instance_id} where the cluster and instance ID segments should +// satisfy the regex expression `[a-z]([a-z0-9-]{0,61}[a-z0-9])?`, +// e.g. 1-63 characters of lowercase letters, numbers, and dashes, +// starting with a letter, and ending with a letter or number. For +// more details see https://google.aip.dev/122. The prefix of the +// instance resource name is the name of the parent resource: * +// projects/{project}/locations/{region}/clusters/{cluster_id}. +func (r *ProjectsLocationsClustersInstancesService) Patch(name string, instance *Instance) *ProjectsLocationsClustersInstancesPatchCall { + c := &ProjectsLocationsClustersInstancesPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + c.instance = instance + return c +} + +// AllowMissing sets the optional parameter "allowMissing": If set to +// true, update succeeds even if instance is not found. In that case, a +// new instance is created and `update_mask` is ignored. +func (c *ProjectsLocationsClustersInstancesPatchCall) AllowMissing(allowMissing bool) *ProjectsLocationsClustersInstancesPatchCall { + c.urlParams_.Set("allowMissing", fmt.Sprint(allowMissing)) + return c +} + +// RequestId sets the optional parameter "requestId": An optional +// request ID to identify requests. Specify a unique request ID so that +// if you must retry your request, the server will know to ignore the +// request if it has already been completed. The server will guarantee +// that for at least 60 minutes since the first request. For example, +// consider a situation where you make an initial request and the +// request times out. If you make the request again with the same +// request ID, the server can check if original operation with the same +// request ID was received, and if so, will ignore the second request. +// This prevents clients from accidentally creating duplicate +// commitments. The request ID must be a valid UUID with the exception +// that zero UUID is not supported +// (00000000-0000-0000-0000-000000000000). +func (c *ProjectsLocationsClustersInstancesPatchCall) RequestId(requestId string) *ProjectsLocationsClustersInstancesPatchCall { + c.urlParams_.Set("requestId", requestId) + return c +} + +// UpdateMask sets the optional parameter "updateMask": Field mask is +// used to specify the fields to be overwritten in the Instance resource +// by the update. The fields specified in the update_mask are relative +// to the resource, not the full request. A field will be overwritten if +// it is in the mask. If the user does not provide a mask then all +// fields will be overwritten. +func (c *ProjectsLocationsClustersInstancesPatchCall) UpdateMask(updateMask string) *ProjectsLocationsClustersInstancesPatchCall { + c.urlParams_.Set("updateMask", updateMask) + return c +} + +// ValidateOnly sets the optional parameter "validateOnly": If set, +// performs request validation (e.g. permission checks and any other +// type of validation), but do not actually execute the update request. +func (c *ProjectsLocationsClustersInstancesPatchCall) ValidateOnly(validateOnly bool) *ProjectsLocationsClustersInstancesPatchCall { + 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 *ProjectsLocationsClustersInstancesPatchCall) Fields(s ...googleapi.Field) *ProjectsLocationsClustersInstancesPatchCall { + 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 *ProjectsLocationsClustersInstancesPatchCall) Context(ctx context.Context) *ProjectsLocationsClustersInstancesPatchCall { + 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 *ProjectsLocationsClustersInstancesPatchCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsClustersInstancesPatchCall) 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.instance) + 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 "alloydb.projects.locations.clusters.instances.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 *ProjectsLocationsClustersInstancesPatchCall) Do(opts ...googleapi.CallOption) (*Operation, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, gensupport.WrapError(&googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + }) + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, gensupport.WrapError(err) + } + ret := &Operation{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Updates the parameters of a single Instance.", + // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/clusters/{clustersId}/instances/{instancesId}", + // "httpMethod": "PATCH", + // "id": "alloydb.projects.locations.clusters.instances.patch", + // "parameterOrder": [ + // "name" + // ], + // "parameters": { + // "allowMissing": { + // "description": "Optional. If set to true, update succeeds even if instance is not found. In that case, a new instance is created and `update_mask` is ignored.", + // "location": "query", + // "type": "boolean" + // }, + // "name": { + // "description": "Output only. The name of the instance resource with the format: * projects/{project}/locations/{region}/clusters/{cluster_id}/instances/{instance_id} where the cluster and instance ID segments should satisfy the regex expression `[a-z]([a-z0-9-]{0,61}[a-z0-9])?`, e.g. 1-63 characters of lowercase letters, numbers, and dashes, starting with a letter, and ending with a letter or number. For more details see https://google.aip.dev/122. The prefix of the instance resource name is the name of the parent resource: * projects/{project}/locations/{region}/clusters/{cluster_id}", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+/clusters/[^/]+/instances/[^/]+$", + // "required": true, + // "type": "string" + // }, + // "requestId": { + // "description": "Optional. An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. The server will guarantee that for at least 60 minutes since the first request. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", + // "location": "query", + // "type": "string" + // }, + // "updateMask": { + // "description": "Optional. Field mask is used to specify the fields to be overwritten in the Instance resource by the update. The fields specified in the update_mask are relative to the resource, not the full request. A field will be overwritten if it is in the mask. If the user does not provide a mask then all fields will be overwritten.", + // "format": "google-fieldmask", + // "location": "query", + // "type": "string" + // }, + // "validateOnly": { + // "description": "Optional. If set, performs request validation (e.g. permission checks and any other type of validation), but do not actually execute the update request.", + // "location": "query", + // "type": "boolean" + // } + // }, + // "path": "v1/{+name}", + // "request": { + // "$ref": "Instance" + // }, + // "response": { + // "$ref": "Operation" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "alloydb.projects.locations.clusters.instances.restart": + +type ProjectsLocationsClustersInstancesRestartCall struct { + s *Service + name string + restartinstancerequest *RestartInstanceRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Restart: Restart an Instance in a cluster. Imperative only. +// +// - name: The name of the resource. For the required format, see the +// comment on the Instance.name field. +func (r *ProjectsLocationsClustersInstancesService) Restart(name string, restartinstancerequest *RestartInstanceRequest) *ProjectsLocationsClustersInstancesRestartCall { + c := &ProjectsLocationsClustersInstancesRestartCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + c.restartinstancerequest = restartinstancerequest + 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 *ProjectsLocationsClustersInstancesRestartCall) Fields(s ...googleapi.Field) *ProjectsLocationsClustersInstancesRestartCall { + 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 *ProjectsLocationsClustersInstancesRestartCall) Context(ctx context.Context) *ProjectsLocationsClustersInstancesRestartCall { + 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 *ProjectsLocationsClustersInstancesRestartCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsClustersInstancesRestartCall) 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.restartinstancerequest) + 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}:restart") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("POST", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "name": c.name, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "alloydb.projects.locations.clusters.instances.restart" 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 *ProjectsLocationsClustersInstancesRestartCall) Do(opts ...googleapi.CallOption) (*Operation, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, gensupport.WrapError(&googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + }) + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, gensupport.WrapError(err) + } + ret := &Operation{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Restart an Instance in a cluster. Imperative only.", + // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/clusters/{clustersId}/instances/{instancesId}:restart", + // "httpMethod": "POST", + // "id": "alloydb.projects.locations.clusters.instances.restart", + // "parameterOrder": [ + // "name" + // ], + // "parameters": { + // "name": { + // "description": "Required. The name of the resource. For the required format, see the comment on the Instance.name field.", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+/clusters/[^/]+/instances/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1/{+name}:restart", + // "request": { + // "$ref": "RestartInstanceRequest" + // }, + // "response": { + // "$ref": "Operation" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "alloydb.projects.locations.clusters.users.create": + +type ProjectsLocationsClustersUsersCreateCall struct { + s *Service + parent string + user *User + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Create: Creates a new User in a given project, location, and cluster. +// +// - parent: Value for parent. +func (r *ProjectsLocationsClustersUsersService) Create(parent string, user *User) *ProjectsLocationsClustersUsersCreateCall { + c := &ProjectsLocationsClustersUsersCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + c.user = user + return c +} + +// RequestId sets the optional parameter "requestId": An optional +// request ID to identify requests. Specify a unique request ID so that +// if you must retry your request, the server will know to ignore the +// request if it has already been completed. The server will guarantee +// that for at least 60 minutes since the first request. For example, +// consider a situation where you make an initial request and the +// request times out. If you make the request again with the same +// request ID, the server can check if original operation with the same +// request ID was received, and if so, will ignore the second request. +// This prevents clients from accidentally creating duplicate +// commitments. The request ID must be a valid UUID with the exception +// that zero UUID is not supported +// (00000000-0000-0000-0000-000000000000). +func (c *ProjectsLocationsClustersUsersCreateCall) RequestId(requestId string) *ProjectsLocationsClustersUsersCreateCall { + c.urlParams_.Set("requestId", requestId) + return c +} + +// UserId sets the optional parameter "userId": Required. ID of the +// requesting object. +func (c *ProjectsLocationsClustersUsersCreateCall) UserId(userId string) *ProjectsLocationsClustersUsersCreateCall { + c.urlParams_.Set("userId", userId) + return c +} + +// ValidateOnly sets the optional parameter "validateOnly": If set, the +// backend validates the request, but doesn't actually execute it. +func (c *ProjectsLocationsClustersUsersCreateCall) ValidateOnly(validateOnly bool) *ProjectsLocationsClustersUsersCreateCall { + 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 *ProjectsLocationsClustersUsersCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsClustersUsersCreateCall { + 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 *ProjectsLocationsClustersUsersCreateCall) Context(ctx context.Context) *ProjectsLocationsClustersUsersCreateCall { + 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 *ProjectsLocationsClustersUsersCreateCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsClustersUsersCreateCall) 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.user) + 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}/users") + 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 "alloydb.projects.locations.clusters.users.create" call. +// Exactly one of *User or error will be non-nil. Any non-2xx status +// code is an error. Response headers are in either +// *User.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 *ProjectsLocationsClustersUsersCreateCall) Do(opts ...googleapi.CallOption) (*User, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, gensupport.WrapError(&googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + }) + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, gensupport.WrapError(err) + } + ret := &User{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Creates a new User in a given project, location, and cluster.", + // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/clusters/{clustersId}/users", + // "httpMethod": "POST", + // "id": "alloydb.projects.locations.clusters.users.create", + // "parameterOrder": [ + // "parent" + // ], + // "parameters": { + // "parent": { + // "description": "Required. Value for parent.", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+/clusters/[^/]+$", + // "required": true, + // "type": "string" + // }, + // "requestId": { + // "description": "Optional. An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. The server will guarantee that for at least 60 minutes since the first request. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", + // "location": "query", + // "type": "string" + // }, + // "userId": { + // "description": "Required. ID of the requesting object.", + // "location": "query", + // "type": "string" + // }, + // "validateOnly": { + // "description": "Optional. If set, the backend validates the request, but doesn't actually execute it.", + // "location": "query", + // "type": "boolean" + // } + // }, + // "path": "v1/{+parent}/users", + // "request": { + // "$ref": "User" + // }, + // "response": { + // "$ref": "User" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "alloydb.projects.locations.clusters.users.delete": + +type ProjectsLocationsClustersUsersDeleteCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Delete: Deletes a single User. +// +// - name: The name of the resource. For the required format, see the +// comment on the User.name field. +func (r *ProjectsLocationsClustersUsersService) Delete(name string) *ProjectsLocationsClustersUsersDeleteCall { + c := &ProjectsLocationsClustersUsersDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + return c +} + +// RequestId sets the optional parameter "requestId": An optional +// request ID to identify requests. Specify a unique request ID so that +// if you must retry your request, the server will know to ignore the +// request if it has already been completed. The server will guarantee +// that for at least 60 minutes after the first request. For example, +// consider a situation where you make an initial request and the +// request times out. If you make the request again with the same +// request ID, the server can check if original operation with the same +// request ID was received, and if so, will ignore the second request. +// This prevents clients from accidentally creating duplicate +// commitments. The request ID must be a valid UUID with the exception +// that zero UUID is not supported +// (00000000-0000-0000-0000-000000000000). +func (c *ProjectsLocationsClustersUsersDeleteCall) RequestId(requestId string) *ProjectsLocationsClustersUsersDeleteCall { + c.urlParams_.Set("requestId", requestId) + return c +} + +// ValidateOnly sets the optional parameter "validateOnly": If set, the +// backend validates the request, but doesn't actually execute it. +func (c *ProjectsLocationsClustersUsersDeleteCall) ValidateOnly(validateOnly bool) *ProjectsLocationsClustersUsersDeleteCall { + 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 *ProjectsLocationsClustersUsersDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsClustersUsersDeleteCall { + 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 *ProjectsLocationsClustersUsersDeleteCall) Context(ctx context.Context) *ProjectsLocationsClustersUsersDeleteCall { + 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 *ProjectsLocationsClustersUsersDeleteCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsClustersUsersDeleteCall) 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 "alloydb.projects.locations.clusters.users.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 *ProjectsLocationsClustersUsersDeleteCall) Do(opts ...googleapi.CallOption) (*Empty, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, gensupport.WrapError(&googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + }) + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, gensupport.WrapError(err) + } + ret := &Empty{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Deletes a single User.", + // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/clusters/{clustersId}/users/{usersId}", + // "httpMethod": "DELETE", + // "id": "alloydb.projects.locations.clusters.users.delete", + // "parameterOrder": [ + // "name" + // ], + // "parameters": { + // "name": { + // "description": "Required. The name of the resource. For the required format, see the comment on the User.name field.", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+/clusters/[^/]+/users/[^/]+$", + // "required": true, + // "type": "string" + // }, + // "requestId": { + // "description": "Optional. An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. The server will guarantee that for at least 60 minutes after the first request. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", + // "location": "query", + // "type": "string" + // }, + // "validateOnly": { + // "description": "Optional. If set, the backend validates the request, but doesn't actually execute it.", + // "location": "query", + // "type": "boolean" + // } + // }, + // "path": "v1/{+name}", + // "response": { + // "$ref": "Empty" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "alloydb.projects.locations.clusters.users.get": + +type ProjectsLocationsClustersUsersGetCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// Get: Gets details of a single User. +// +// - name: The name of the resource. For the required format, see the +// comment on the User.name field. +func (r *ProjectsLocationsClustersUsersService) Get(name string) *ProjectsLocationsClustersUsersGetCall { + c := &ProjectsLocationsClustersUsersGetCall{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 *ProjectsLocationsClustersUsersGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsClustersUsersGetCall { + 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 *ProjectsLocationsClustersUsersGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsClustersUsersGetCall { + 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 *ProjectsLocationsClustersUsersGetCall) Context(ctx context.Context) *ProjectsLocationsClustersUsersGetCall { + 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 *ProjectsLocationsClustersUsersGetCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsClustersUsersGetCall) 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 "alloydb.projects.locations.clusters.users.get" call. +// Exactly one of *User or error will be non-nil. Any non-2xx status +// code is an error. Response headers are in either +// *User.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 *ProjectsLocationsClustersUsersGetCall) Do(opts ...googleapi.CallOption) (*User, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, gensupport.WrapError(&googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + }) + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, gensupport.WrapError(err) + } + ret := &User{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Gets details of a single User.", + // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/clusters/{clustersId}/users/{usersId}", + // "httpMethod": "GET", + // "id": "alloydb.projects.locations.clusters.users.get", + // "parameterOrder": [ + // "name" + // ], + // "parameters": { + // "name": { + // "description": "Required. The name of the resource. For the required format, see the comment on the User.name field.", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+/clusters/[^/]+/users/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1/{+name}", + // "response": { + // "$ref": "User" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "alloydb.projects.locations.clusters.users.list": + +type ProjectsLocationsClustersUsersListCall struct { + s *Service + parent string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// List: Lists Users in a given project and location. +// +// - parent: Parent value for ListUsersRequest. +func (r *ProjectsLocationsClustersUsersService) List(parent string) *ProjectsLocationsClustersUsersListCall { + c := &ProjectsLocationsClustersUsersListCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + return c +} + +// Filter sets the optional parameter "filter": Filtering results +func (c *ProjectsLocationsClustersUsersListCall) Filter(filter string) *ProjectsLocationsClustersUsersListCall { + c.urlParams_.Set("filter", filter) + return c +} + +// OrderBy sets the optional parameter "orderBy": Hint for how to order +// the results +func (c *ProjectsLocationsClustersUsersListCall) OrderBy(orderBy string) *ProjectsLocationsClustersUsersListCall { + c.urlParams_.Set("orderBy", orderBy) + return c +} + +// PageSize sets the optional parameter "pageSize": Requested page size. +// Server may return fewer items than requested. If unspecified, server +// will pick an appropriate default. +func (c *ProjectsLocationsClustersUsersListCall) PageSize(pageSize int64) *ProjectsLocationsClustersUsersListCall { + c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) + return c +} + +// PageToken sets the optional parameter "pageToken": A token +// identifying a page of results the server should return. +func (c *ProjectsLocationsClustersUsersListCall) PageToken(pageToken string) *ProjectsLocationsClustersUsersListCall { + 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 *ProjectsLocationsClustersUsersListCall) Fields(s ...googleapi.Field) *ProjectsLocationsClustersUsersListCall { + 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 *ProjectsLocationsClustersUsersListCall) IfNoneMatch(entityTag string) *ProjectsLocationsClustersUsersListCall { + 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 *ProjectsLocationsClustersUsersListCall) Context(ctx context.Context) *ProjectsLocationsClustersUsersListCall { + 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 *ProjectsLocationsClustersUsersListCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsClustersUsersListCall) 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}/users") + 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 "alloydb.projects.locations.clusters.users.list" call. +// Exactly one of *ListUsersResponse or error will be non-nil. Any +// non-2xx status code is an error. Response headers are in either +// *ListUsersResponse.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 *ProjectsLocationsClustersUsersListCall) Do(opts ...googleapi.CallOption) (*ListUsersResponse, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, gensupport.WrapError(&googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + }) + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, gensupport.WrapError(err) + } + ret := &ListUsersResponse{ + 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 Users in a given project and location.", + // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/clusters/{clustersId}/users", + // "httpMethod": "GET", + // "id": "alloydb.projects.locations.clusters.users.list", + // "parameterOrder": [ + // "parent" + // ], + // "parameters": { + // "filter": { + // "description": "Optional. Filtering results", + // "location": "query", + // "type": "string" + // }, + // "orderBy": { + // "description": "Optional. Hint for how to order the results", + // "location": "query", + // "type": "string" + // }, + // "pageSize": { + // "description": "Optional. Requested page size. Server may return fewer items than requested. If unspecified, server will pick an appropriate default.", + // "format": "int32", + // "location": "query", + // "type": "integer" + // }, + // "pageToken": { + // "description": "Optional. A token identifying a page of results the server should return.", + // "location": "query", + // "type": "string" + // }, + // "parent": { + // "description": "Required. Parent value for ListUsersRequest", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+/clusters/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1/{+parent}/users", + // "response": { + // "$ref": "ListUsersResponse" + // }, + // "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 *ProjectsLocationsClustersUsersListCall) Pages(ctx context.Context, f func(*ListUsersResponse) 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 "alloydb.projects.locations.clusters.users.patch": + +type ProjectsLocationsClustersUsersPatchCall struct { + s *Service + name string + user *User + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Patch: Updates the parameters of a single User. +// +// - name: Output only. Name of the resource in the form of +// projects/{project}/locations/{location}/cluster/{cluster}/users/{use +// r}. +func (r *ProjectsLocationsClustersUsersService) Patch(name string, user *User) *ProjectsLocationsClustersUsersPatchCall { + c := &ProjectsLocationsClustersUsersPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + c.user = user + return c +} + +// AllowMissing sets the optional parameter "allowMissing": Allow +// missing fields in the update mask. +func (c *ProjectsLocationsClustersUsersPatchCall) AllowMissing(allowMissing bool) *ProjectsLocationsClustersUsersPatchCall { + c.urlParams_.Set("allowMissing", fmt.Sprint(allowMissing)) + return c +} + +// RequestId sets the optional parameter "requestId": An optional +// request ID to identify requests. Specify a unique request ID so that +// if you must retry your request, the server will know to ignore the +// request if it has already been completed. The server will guarantee +// that for at least 60 minutes since the first request. For example, +// consider a situation where you make an initial request and the +// request times out. If you make the request again with the same +// request ID, the server can check if original operation with the same +// request ID was received, and if so, will ignore the second request. +// This prevents clients from accidentally creating duplicate +// commitments. The request ID must be a valid UUID with the exception +// that zero UUID is not supported +// (00000000-0000-0000-0000-000000000000). +func (c *ProjectsLocationsClustersUsersPatchCall) RequestId(requestId string) *ProjectsLocationsClustersUsersPatchCall { + c.urlParams_.Set("requestId", requestId) + return c +} + +// UpdateMask sets the optional parameter "updateMask": Field mask is +// used to specify the fields to be overwritten in the User resource by +// the update. The fields specified in the update_mask are relative to +// the resource, not the full request. A field will be overwritten if it +// is in the mask. If the user does not provide a mask then all fields +// will be overwritten. +func (c *ProjectsLocationsClustersUsersPatchCall) UpdateMask(updateMask string) *ProjectsLocationsClustersUsersPatchCall { + c.urlParams_.Set("updateMask", updateMask) + return c +} + +// ValidateOnly sets the optional parameter "validateOnly": If set, the +// backend validates the request, but doesn't actually execute it. +func (c *ProjectsLocationsClustersUsersPatchCall) ValidateOnly(validateOnly bool) *ProjectsLocationsClustersUsersPatchCall { + 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 *ProjectsLocationsClustersUsersPatchCall) Fields(s ...googleapi.Field) *ProjectsLocationsClustersUsersPatchCall { + 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 *ProjectsLocationsClustersUsersPatchCall) Context(ctx context.Context) *ProjectsLocationsClustersUsersPatchCall { + 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 *ProjectsLocationsClustersUsersPatchCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsClustersUsersPatchCall) 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.user) + 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 "alloydb.projects.locations.clusters.users.patch" call. +// Exactly one of *User or error will be non-nil. Any non-2xx status +// code is an error. Response headers are in either +// *User.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 *ProjectsLocationsClustersUsersPatchCall) Do(opts ...googleapi.CallOption) (*User, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, gensupport.WrapError(&googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + }) + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, gensupport.WrapError(err) + } + ret := &User{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Updates the parameters of a single User.", + // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/clusters/{clustersId}/users/{usersId}", + // "httpMethod": "PATCH", + // "id": "alloydb.projects.locations.clusters.users.patch", + // "parameterOrder": [ + // "name" + // ], + // "parameters": { + // "allowMissing": { + // "description": "Optional. Allow missing fields in the update mask.", + // "location": "query", + // "type": "boolean" + // }, + // "name": { + // "description": "Output only. Name of the resource in the form of projects/{project}/locations/{location}/cluster/{cluster}/users/{user}.", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+/clusters/[^/]+/users/[^/]+$", + // "required": true, + // "type": "string" + // }, + // "requestId": { + // "description": "Optional. An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. The server will guarantee that for at least 60 minutes since the first request. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", + // "location": "query", + // "type": "string" + // }, + // "updateMask": { + // "description": "Optional. Field mask is used to specify the fields to be overwritten in the User resource by the update. The fields specified in the update_mask are relative to the resource, not the full request. A field will be overwritten if it is in the mask. If the user does not provide a mask then all fields will be overwritten.", + // "format": "google-fieldmask", + // "location": "query", + // "type": "string" + // }, + // "validateOnly": { + // "description": "Optional. If set, the backend validates the request, but doesn't actually execute it.", + // "location": "query", + // "type": "boolean" + // } + // }, + // "path": "v1/{+name}", + // "request": { + // "$ref": "User" + // }, + // "response": { + // "$ref": "User" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "alloydb.projects.locations.operations.cancel": + +type ProjectsLocationsOperationsCancelCall struct { + s *Service + name string + canceloperationrequest *CancelOperationRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Cancel: Starts asynchronous cancellation on a long-running operation. +// The server makes a best effort to cancel the operation, but success +// is not guaranteed. If the server doesn't support this method, it +// returns `google.rpc.Code.UNIMPLEMENTED`. Clients can use +// Operations.GetOperation or other methods to check whether the +// cancellation succeeded or whether the operation completed despite +// cancellation. On successful cancellation, the operation is not +// deleted; instead, it becomes an operation with an Operation.error +// value with a google.rpc.Status.code of 1, corresponding to +// `Code.CANCELLED`. +// +// - name: The name of the operation resource to be cancelled. +func (r *ProjectsLocationsOperationsService) Cancel(name string, canceloperationrequest *CancelOperationRequest) *ProjectsLocationsOperationsCancelCall { + c := &ProjectsLocationsOperationsCancelCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + c.canceloperationrequest = canceloperationrequest + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *ProjectsLocationsOperationsCancelCall) Fields(s ...googleapi.Field) *ProjectsLocationsOperationsCancelCall { + 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 *ProjectsLocationsOperationsCancelCall) Context(ctx context.Context) *ProjectsLocationsOperationsCancelCall { + 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 *ProjectsLocationsOperationsCancelCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsOperationsCancelCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.canceloperationrequest) + if err != nil { + return nil, err + } + reqHeaders.Set("Content-Type", "application/json") + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}:cancel") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("POST", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "name": c.name, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "alloydb.projects.locations.operations.cancel" call. +// Exactly one of *Empty or error will be non-nil. Any non-2xx status +// code is an error. Response headers are in either +// *Empty.ServerResponse.Header or (if a response was returned at all) +// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to +// check whether the returned error was because http.StatusNotModified +// was returned. +func (c *ProjectsLocationsOperationsCancelCall) Do(opts ...googleapi.CallOption) (*Empty, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, gensupport.WrapError(&googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + }) + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, gensupport.WrapError(err) + } + ret := &Empty{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Starts asynchronous cancellation on a long-running operation. The server makes a best effort to cancel the operation, but success is not guaranteed. If the server doesn't support this method, it returns `google.rpc.Code.UNIMPLEMENTED`. Clients can use Operations.GetOperation or other methods to check whether the cancellation succeeded or whether the operation completed despite cancellation. On successful cancellation, the operation is not deleted; instead, it becomes an operation with an Operation.error value with a google.rpc.Status.code of 1, corresponding to `Code.CANCELLED`.", + // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/operations/{operationsId}:cancel", + // "httpMethod": "POST", + // "id": "alloydb.projects.locations.operations.cancel", + // "parameterOrder": [ + // "name" + // ], + // "parameters": { + // "name": { + // "description": "The name of the operation resource to be cancelled.", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+/operations/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1/{+name}:cancel", + // "request": { + // "$ref": "CancelOperationRequest" + // }, + // "response": { + // "$ref": "Empty" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "alloydb.projects.locations.operations.delete": + +type ProjectsLocationsOperationsDeleteCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Delete: Deletes a long-running operation. This method indicates that +// the client is no longer interested in the operation result. It does +// not cancel the operation. If the server doesn't support this method, +// it returns `google.rpc.Code.UNIMPLEMENTED`. +// +// - name: The name of the operation resource to be deleted. +func (r *ProjectsLocationsOperationsService) Delete(name string) *ProjectsLocationsOperationsDeleteCall { + c := &ProjectsLocationsOperationsDeleteCall{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 *ProjectsLocationsOperationsDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsOperationsDeleteCall { + 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 *ProjectsLocationsOperationsDeleteCall) Context(ctx context.Context) *ProjectsLocationsOperationsDeleteCall { + 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 *ProjectsLocationsOperationsDeleteCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsOperationsDeleteCall) 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 "alloydb.projects.locations.operations.delete" call. +// Exactly one of *Empty or error will be non-nil. Any non-2xx status +// code is an error. Response headers are in either +// *Empty.ServerResponse.Header or (if a response was returned at all) +// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to +// check whether the returned error was because http.StatusNotModified +// was returned. +func (c *ProjectsLocationsOperationsDeleteCall) Do(opts ...googleapi.CallOption) (*Empty, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, gensupport.WrapError(&googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + }) + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, gensupport.WrapError(err) + } + ret := &Empty{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Deletes a long-running operation. This method indicates that the client is no longer interested in the operation result. It does not cancel the operation. If the server doesn't support this method, it returns `google.rpc.Code.UNIMPLEMENTED`.", + // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/operations/{operationsId}", + // "httpMethod": "DELETE", + // "id": "alloydb.projects.locations.operations.delete", + // "parameterOrder": [ + // "name" + // ], + // "parameters": { + // "name": { + // "description": "The name of the operation resource to be deleted.", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+/operations/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1/{+name}", + // "response": { + // "$ref": "Empty" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "alloydb.projects.locations.operations.get": + +type ProjectsLocationsOperationsGetCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// Get: Gets the latest state of a long-running operation. Clients can +// use this method to poll the operation result at intervals as +// recommended by the API service. +// +// - name: The name of the operation resource. +func (r *ProjectsLocationsOperationsService) Get(name string) *ProjectsLocationsOperationsGetCall { + c := &ProjectsLocationsOperationsGetCall{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 *ProjectsLocationsOperationsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsOperationsGetCall { + 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 *ProjectsLocationsOperationsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsOperationsGetCall { + 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 *ProjectsLocationsOperationsGetCall) Context(ctx context.Context) *ProjectsLocationsOperationsGetCall { + 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 *ProjectsLocationsOperationsGetCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsOperationsGetCall) 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 "alloydb.projects.locations.operations.get" call. +// Exactly one of *Operation or error will be non-nil. Any non-2xx +// status code is an error. Response headers are in either +// *Operation.ServerResponse.Header or (if a response was returned at +// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified +// to check whether the returned error was because +// http.StatusNotModified was returned. +func (c *ProjectsLocationsOperationsGetCall) Do(opts ...googleapi.CallOption) (*Operation, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, gensupport.WrapError(&googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + }) + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, gensupport.WrapError(err) + } + ret := &Operation{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Gets the latest state of a long-running operation. Clients can use this method to poll the operation result at intervals as recommended by the API service.", + // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/operations/{operationsId}", + // "httpMethod": "GET", + // "id": "alloydb.projects.locations.operations.get", + // "parameterOrder": [ + // "name" + // ], + // "parameters": { + // "name": { + // "description": "The name of the operation resource.", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+/operations/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1/{+name}", + // "response": { + // "$ref": "Operation" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "alloydb.projects.locations.operations.list": + +type ProjectsLocationsOperationsListCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// List: Lists operations that match the specified filter in the +// request. If the server doesn't support this method, it returns +// `UNIMPLEMENTED`. +// +// - name: The name of the operation's parent resource. +func (r *ProjectsLocationsOperationsService) List(name string) *ProjectsLocationsOperationsListCall { + c := &ProjectsLocationsOperationsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + return c +} + +// Filter sets the optional parameter "filter": The standard list +// filter. +func (c *ProjectsLocationsOperationsListCall) Filter(filter string) *ProjectsLocationsOperationsListCall { + c.urlParams_.Set("filter", filter) + return c +} + +// PageSize sets the optional parameter "pageSize": The standard list +// page size. +func (c *ProjectsLocationsOperationsListCall) PageSize(pageSize int64) *ProjectsLocationsOperationsListCall { + c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) + return c +} + +// PageToken sets the optional parameter "pageToken": The standard list +// page token. +func (c *ProjectsLocationsOperationsListCall) PageToken(pageToken string) *ProjectsLocationsOperationsListCall { + 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 *ProjectsLocationsOperationsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsOperationsListCall { + 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 *ProjectsLocationsOperationsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsOperationsListCall { + 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 *ProjectsLocationsOperationsListCall) Context(ctx context.Context) *ProjectsLocationsOperationsListCall { + 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 *ProjectsLocationsOperationsListCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsOperationsListCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) + } + var body io.Reader = nil + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}/operations") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("GET", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "name": c.name, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "alloydb.projects.locations.operations.list" call. +// Exactly one of *ListOperationsResponse or error will be non-nil. Any +// non-2xx status code is an error. Response headers are in either +// *ListOperationsResponse.ServerResponse.Header or (if a response was +// returned at all) in error.(*googleapi.Error).Header. Use +// googleapi.IsNotModified to check whether the returned error was +// because http.StatusNotModified was returned. +func (c *ProjectsLocationsOperationsListCall) Do(opts ...googleapi.CallOption) (*ListOperationsResponse, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, gensupport.WrapError(&googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + }) + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, gensupport.WrapError(err) + } + ret := &ListOperationsResponse{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Lists operations that match the specified filter in the request. If the server doesn't support this method, it returns `UNIMPLEMENTED`.", + // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/operations", + // "httpMethod": "GET", + // "id": "alloydb.projects.locations.operations.list", + // "parameterOrder": [ + // "name" + // ], + // "parameters": { + // "filter": { + // "description": "The standard list filter.", + // "location": "query", + // "type": "string" + // }, + // "name": { + // "description": "The name of the operation's parent resource.", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+$", + // "required": true, + // "type": "string" + // }, + // "pageSize": { + // "description": "The standard list page size.", + // "format": "int32", + // "location": "query", + // "type": "integer" + // }, + // "pageToken": { + // "description": "The standard list page token.", + // "location": "query", + // "type": "string" + // } + // }, + // "path": "v1/{+name}/operations", + // "response": { + // "$ref": "ListOperationsResponse" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// Pages invokes f for each page of results. +// A non-nil error returned from f will halt the iteration. +// The provided context supersedes any context provided to the Context method. +func (c *ProjectsLocationsOperationsListCall) Pages(ctx context.Context, f func(*ListOperationsResponse) error) error { + c.ctx_ = ctx + defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point + for { + x, err := c.Do() + if err != nil { + return err + } + if err := f(x); err != nil { + return err + } + if x.NextPageToken == "" { + return nil + } + c.PageToken(x.NextPageToken) + } +} + +// method id "alloydb.projects.locations.supportedDatabaseFlags.list": + +type ProjectsLocationsSupportedDatabaseFlagsListCall struct { + s *Service + parent string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// List: Lists SupportedDatabaseFlags for a given project and location. +// +// - parent: The name of the parent resource. The required format is: * +// projects/{project}/locations/{location} Regardless of the parent +// specified here, as long it is contains a valid project and +// location, the service will return a static list of supported flags +// resources. Note that we do not yet support region-specific flags. +func (r *ProjectsLocationsSupportedDatabaseFlagsService) List(parent string) *ProjectsLocationsSupportedDatabaseFlagsListCall { + c := &ProjectsLocationsSupportedDatabaseFlagsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + return c +} + +// PageSize sets the optional parameter "pageSize": Requested page size. +// Server may return fewer items than requested. If unspecified, server +// will pick an appropriate default. +func (c *ProjectsLocationsSupportedDatabaseFlagsListCall) PageSize(pageSize int64) *ProjectsLocationsSupportedDatabaseFlagsListCall { + c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) + return c +} + +// PageToken sets the optional parameter "pageToken": A token +// identifying a page of results the server should return. +func (c *ProjectsLocationsSupportedDatabaseFlagsListCall) PageToken(pageToken string) *ProjectsLocationsSupportedDatabaseFlagsListCall { + 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 *ProjectsLocationsSupportedDatabaseFlagsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsSupportedDatabaseFlagsListCall { + 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 *ProjectsLocationsSupportedDatabaseFlagsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsSupportedDatabaseFlagsListCall { + 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 *ProjectsLocationsSupportedDatabaseFlagsListCall) Context(ctx context.Context) *ProjectsLocationsSupportedDatabaseFlagsListCall { + 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 *ProjectsLocationsSupportedDatabaseFlagsListCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsSupportedDatabaseFlagsListCall) 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}/supportedDatabaseFlags") + 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 "alloydb.projects.locations.supportedDatabaseFlags.list" call. +// Exactly one of *ListSupportedDatabaseFlagsResponse or error will be +// non-nil. Any non-2xx status code is an error. Response headers are in +// either *ListSupportedDatabaseFlagsResponse.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 *ProjectsLocationsSupportedDatabaseFlagsListCall) Do(opts ...googleapi.CallOption) (*ListSupportedDatabaseFlagsResponse, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, gensupport.WrapError(&googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + }) + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, gensupport.WrapError(err) + } + ret := &ListSupportedDatabaseFlagsResponse{ + 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 SupportedDatabaseFlags for a given project and location.", + // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/supportedDatabaseFlags", + // "httpMethod": "GET", + // "id": "alloydb.projects.locations.supportedDatabaseFlags.list", + // "parameterOrder": [ + // "parent" + // ], + // "parameters": { + // "pageSize": { + // "description": "Requested page size. Server may return fewer items than requested. If unspecified, server will pick an appropriate default.", + // "format": "int32", + // "location": "query", + // "type": "integer" + // }, + // "pageToken": { + // "description": "A token identifying a page of results the server should return.", + // "location": "query", + // "type": "string" + // }, + // "parent": { + // "description": "Required. The name of the parent resource. The required format is: * projects/{project}/locations/{location} Regardless of the parent specified here, as long it is contains a valid project and location, the service will return a static list of supported flags resources. Note that we do not yet support region-specific flags.", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1/{+parent}/supportedDatabaseFlags", + // "response": { + // "$ref": "ListSupportedDatabaseFlagsResponse" + // }, + // "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 *ProjectsLocationsSupportedDatabaseFlagsListCall) Pages(ctx context.Context, f func(*ListSupportedDatabaseFlagsResponse) 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) + } +} diff --git a/alloydb/v1alpha/alloydb-api.json b/alloydb/v1alpha/alloydb-api.json new file mode 100644 index 00000000000..63ac9ce3849 --- /dev/null +++ b/alloydb/v1alpha/alloydb-api.json @@ -0,0 +1,3592 @@ +{ + "auth": { + "oauth2": { + "scopes": { + "https://www.googleapis.com/auth/cloud-platform": { + "description": "See, edit, configure, and delete your Google Cloud data and see the email address for your Google Account." + } + } + } + }, + "basePath": "", + "baseUrl": "https://alloydb.googleapis.com/", + "batchPath": "batch", + "canonicalName": "Cloud AlloyDB Admin", + "description": "AlloyDB for PostgreSQL is an open source-compatible database service that provides a powerful option for migrating, modernizing, or building commercial-grade applications. It offers full compatibility with standard PostgreSQL, and is more than 4x faster for transactional workloads and up to 100x faster for analytical queries than standard PostgreSQL in our performance tests. AlloyDB for PostgreSQL offers a 99.99 percent availability SLA inclusive of maintenance. AlloyDB is optimized for the most demanding use cases, allowing you to build new applications that require high transaction throughput, large database sizes, or multiple read resources; scale existing PostgreSQL workloads with no application changes; and modernize legacy proprietary databases. ", + "discoveryVersion": "v1", + "documentationLink": "https://cloud.google.com/alloydb/", + "fullyEncodeReservedExpansion": true, + "icons": { + "x16": "http://www.google.com/images/icons/product/search-16.gif", + "x32": "http://www.google.com/images/icons/product/search-32.gif" + }, + "id": "alloydb:v1alpha", + "kind": "discovery#restDescription", + "mtlsRootUrl": "https://alloydb.mtls.googleapis.com/", + "name": "alloydb", + "ownerDomain": "google.com", + "ownerName": "Google", + "parameters": { + "$.xgafv": { + "description": "V1 error format.", + "enum": [ + "1", + "2" + ], + "enumDescriptions": [ + "v1 error format", + "v2 error format" + ], + "location": "query", + "type": "string" + }, + "access_token": { + "description": "OAuth access token.", + "location": "query", + "type": "string" + }, + "alt": { + "default": "json", + "description": "Data format for response.", + "enum": [ + "json", + "media", + "proto" + ], + "enumDescriptions": [ + "Responses with Content-Type of application/json", + "Media download with context-dependent Content-Type", + "Responses with Content-Type of application/x-protobuf" + ], + "location": "query", + "type": "string" + }, + "callback": { + "description": "JSONP", + "location": "query", + "type": "string" + }, + "fields": { + "description": "Selector specifying which fields to include in a partial response.", + "location": "query", + "type": "string" + }, + "key": { + "description": "API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token.", + "location": "query", + "type": "string" + }, + "oauth_token": { + "description": "OAuth 2.0 token for the current user.", + "location": "query", + "type": "string" + }, + "prettyPrint": { + "default": "true", + "description": "Returns response with indentations and line breaks.", + "location": "query", + "type": "boolean" + }, + "quotaUser": { + "description": "Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters.", + "location": "query", + "type": "string" + }, + "uploadType": { + "description": "Legacy upload protocol for media (e.g. \"media\", \"multipart\").", + "location": "query", + "type": "string" + }, + "upload_protocol": { + "description": "Upload protocol for media (e.g. \"raw\", \"multipart\").", + "location": "query", + "type": "string" + } + }, + "protocol": "rest", + "resources": { + "projects": { + "resources": { + "locations": { + "methods": { + "get": { + "description": "Gets information about a location.", + "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}", + "httpMethod": "GET", + "id": "alloydb.projects.locations.get", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Resource name for the location.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1alpha/{+name}", + "response": { + "$ref": "GoogleCloudLocationLocation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "list": { + "description": "Lists information about the supported locations for this service.", + "flatPath": "v1alpha/projects/{projectsId}/locations", + "httpMethod": "GET", + "id": "alloydb.projects.locations.list", + "parameterOrder": [ + "name" + ], + "parameters": { + "filter": { + "description": "A filter to narrow down results to a preferred subset. The filtering language accepts strings like `\"displayName=tokyo\"`, and is documented in more detail in [AIP-160](https://google.aip.dev/160).", + "location": "query", + "type": "string" + }, + "name": { + "description": "The resource that owns the locations collection, if applicable.", + "location": "path", + "pattern": "^projects/[^/]+$", + "required": true, + "type": "string" + }, + "pageSize": { + "description": "The maximum number of results to return. If not set, the service selects a default.", + "format": "int32", + "location": "query", + "type": "integer" + }, + "pageToken": { + "description": "A page token received from the `next_page_token` field in the response. Send that page token to receive the subsequent page.", + "location": "query", + "type": "string" + } + }, + "path": "v1alpha/{+name}/locations", + "response": { + "$ref": "GoogleCloudLocationListLocationsResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + } + }, + "resources": { + "backups": { + "methods": { + "create": { + "description": "Creates a new Backup in a given project and location.", + "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/backups", + "httpMethod": "POST", + "id": "alloydb.projects.locations.backups.create", + "parameterOrder": [ + "parent" + ], + "parameters": { + "backupId": { + "description": "Required. ID of the requesting object.", + "location": "query", + "type": "string" + }, + "parent": { + "description": "Required. Value for parent.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+$", + "required": true, + "type": "string" + }, + "requestId": { + "description": "Optional. An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. The server will guarantee that for at least 60 minutes since the first request. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", + "location": "query", + "type": "string" + }, + "validateOnly": { + "description": "Optional. If set, the backend validates the request, but doesn't actually execute it.", + "location": "query", + "type": "boolean" + } + }, + "path": "v1alpha/{+parent}/backups", + "request": { + "$ref": "Backup" + }, + "response": { + "$ref": "Operation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "delete": { + "description": "Deletes a single Backup.", + "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/backups/{backupsId}", + "httpMethod": "DELETE", + "id": "alloydb.projects.locations.backups.delete", + "parameterOrder": [ + "name" + ], + "parameters": { + "etag": { + "description": "Optional. The current etag of the Backup. If an etag is provided and does not match the current etag of the Backup, deletion will be blocked and an ABORTED error will be returned.", + "location": "query", + "type": "string" + }, + "name": { + "description": "Required. Name of the resource. For the required format, see the comment on the Backup.name field.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/backups/[^/]+$", + "required": true, + "type": "string" + }, + "requestId": { + "description": "Optional. An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. The server will guarantee that for at least 60 minutes after the first request. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", + "location": "query", + "type": "string" + }, + "validateOnly": { + "description": "Optional. If set, the backend validates the request, but doesn't actually execute it.", + "location": "query", + "type": "boolean" + } + }, + "path": "v1alpha/{+name}", + "response": { + "$ref": "Operation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "get": { + "description": "Gets details of a single Backup.", + "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/backups/{backupsId}", + "httpMethod": "GET", + "id": "alloydb.projects.locations.backups.get", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Required. Name of the resource", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/backups/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1alpha/{+name}", + "response": { + "$ref": "Backup" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "list": { + "description": "Lists Backups in a given project and location.", + "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/backups", + "httpMethod": "GET", + "id": "alloydb.projects.locations.backups.list", + "parameterOrder": [ + "parent" + ], + "parameters": { + "filter": { + "description": "Filtering results", + "location": "query", + "type": "string" + }, + "orderBy": { + "description": "Hint for how to order the results", + "location": "query", + "type": "string" + }, + "pageSize": { + "description": "Requested page size. Server may return fewer items than requested. If unspecified, server will pick an appropriate default.", + "format": "int32", + "location": "query", + "type": "integer" + }, + "pageToken": { + "description": "A token identifying a page of results the server should return.", + "location": "query", + "type": "string" + }, + "parent": { + "description": "Required. Parent value for ListBackupsRequest", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1alpha/{+parent}/backups", + "response": { + "$ref": "ListBackupsResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "patch": { + "description": "Updates the parameters of a single Backup.", + "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/backups/{backupsId}", + "httpMethod": "PATCH", + "id": "alloydb.projects.locations.backups.patch", + "parameterOrder": [ + "name" + ], + "parameters": { + "allowMissing": { + "description": "Optional. If set to true, update succeeds even if instance is not found. In that case, a new backup is created and `update_mask` is ignored.", + "location": "query", + "type": "boolean" + }, + "name": { + "description": "Output only. The name of the backup resource with the format: * projects/{project}/locations/{region}/backups/{backup_id} where the cluster and backup ID segments should satisfy the regex expression `[a-z]([a-z0-9-]{0,61}[a-z0-9])?`, e.g. 1-63 characters of lowercase letters, numbers, and dashes, starting with a letter, and ending with a letter or number. For more details see https://google.aip.dev/122. The prefix of the backup resource name is the name of the parent resource: * projects/{project}/locations/{region}", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/backups/[^/]+$", + "required": true, + "type": "string" + }, + "requestId": { + "description": "Optional. An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. The server will guarantee that for at least 60 minutes since the first request. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", + "location": "query", + "type": "string" + }, + "updateMask": { + "description": "Optional. Field mask is used to specify the fields to be overwritten in the Backup resource by the update. The fields specified in the update_mask are relative to the resource, not the full request. A field will be overwritten if it is in the mask. If the user does not provide a mask then all fields will be overwritten.", + "format": "google-fieldmask", + "location": "query", + "type": "string" + }, + "validateOnly": { + "description": "Optional. If set, the backend validates the request, but doesn't actually execute it.", + "location": "query", + "type": "boolean" + } + }, + "path": "v1alpha/{+name}", + "request": { + "$ref": "Backup" + }, + "response": { + "$ref": "Operation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + } + } + }, + "clusters": { + "methods": { + "create": { + "description": "Creates a new Cluster in a given project and location.", + "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/clusters", + "httpMethod": "POST", + "id": "alloydb.projects.locations.clusters.create", + "parameterOrder": [ + "parent" + ], + "parameters": { + "clusterId": { + "description": "Required. ID of the requesting object.", + "location": "query", + "type": "string" + }, + "parent": { + "description": "Required. The location of the new cluster. For the required format, see the comment on the Cluster.name field.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+$", + "required": true, + "type": "string" + }, + "requestId": { + "description": "Optional. An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. The server will guarantee that for at least 60 minutes since the first request. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", + "location": "query", + "type": "string" + }, + "validateOnly": { + "description": "Optional. If set, performs request validation (e.g. permission checks and any other type of validation), but do not actually execute the create request.", + "location": "query", + "type": "boolean" + } + }, + "path": "v1alpha/{+parent}/clusters", + "request": { + "$ref": "Cluster" + }, + "response": { + "$ref": "Operation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "createsecondary": { + "description": "Creates a cluster of type SECONDARY in the given location using the primary cluster as the source.", + "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/clusters:createsecondary", + "httpMethod": "POST", + "id": "alloydb.projects.locations.clusters.createsecondary", + "parameterOrder": [ + "parent" + ], + "parameters": { + "clusterId": { + "description": "Required. ID of the requesting object (the secondary cluster).", + "location": "query", + "type": "string" + }, + "parent": { + "description": "Required. The location of the new cluster. For the required format, see the comment on the Cluster.name field.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+$", + "required": true, + "type": "string" + }, + "requestId": { + "description": "Optional. An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. The server will guarantee that for at least 60 minutes since the first request. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", + "location": "query", + "type": "string" + }, + "validateOnly": { + "description": "Optional. If set, performs request validation (e.g. permission checks and any other type of validation), but do not actually execute the create request.", + "location": "query", + "type": "boolean" + } + }, + "path": "v1alpha/{+parent}/clusters:createsecondary", + "request": { + "$ref": "Cluster" + }, + "response": { + "$ref": "Operation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "delete": { + "description": "Deletes a single Cluster.", + "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/clusters/{clustersId}", + "httpMethod": "DELETE", + "id": "alloydb.projects.locations.clusters.delete", + "parameterOrder": [ + "name" + ], + "parameters": { + "etag": { + "description": "Optional. The current etag of the Cluster. If an etag is provided and does not match the current etag of the Cluster, deletion will be blocked and an ABORTED error will be returned.", + "location": "query", + "type": "string" + }, + "force": { + "description": "Optional. Whether to cascade delete child instances for given cluster.", + "location": "query", + "type": "boolean" + }, + "name": { + "description": "Required. The name of the resource. For the required format, see the comment on the Cluster.name field.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/clusters/[^/]+$", + "required": true, + "type": "string" + }, + "requestId": { + "description": "Optional. An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. The server will guarantee that for at least 60 minutes after the first request. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", + "location": "query", + "type": "string" + }, + "validateOnly": { + "description": "Optional. If set, performs request validation (e.g. permission checks and any other type of validation), but do not actually execute the delete.", + "location": "query", + "type": "boolean" + } + }, + "path": "v1alpha/{+name}", + "response": { + "$ref": "Operation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "generateClientCertificate": { + "description": "Generate a client certificate signed by a Cluster CA. The sole purpose of this endpoint is to support AlloyDB connectors and the Auth Proxy client. The endpoint's behavior is subject to change without notice, so do not rely on its behavior remaining constant. Future changes will not break AlloyDB connectors or the Auth Proxy client.", + "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/clusters/{clustersId}:generateClientCertificate", + "httpMethod": "POST", + "id": "alloydb.projects.locations.clusters.generateClientCertificate", + "parameterOrder": [ + "parent" + ], + "parameters": { + "parent": { + "description": "Required. The name of the parent resource. The required format is: * projects/{project}/locations/{location}/clusters/{cluster}", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/clusters/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1alpha/{+parent}:generateClientCertificate", + "request": { + "$ref": "GenerateClientCertificateRequest" + }, + "response": { + "$ref": "GenerateClientCertificateResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "get": { + "description": "Gets details of a single Cluster.", + "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/clusters/{clustersId}", + "httpMethod": "GET", + "id": "alloydb.projects.locations.clusters.get", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Required. The name of the resource. For the required format, see the comment on the Cluster.name field.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/clusters/[^/]+$", + "required": true, + "type": "string" + }, + "view": { + "description": "Optional. The view of the cluster to return. Returns all default fields if not set.", + "enum": [ + "CLUSTER_VIEW_UNSPECIFIED", + "CLUSTER_VIEW_BASIC", + "CLUSTER_VIEW_CONTINUOUS_BACKUP" + ], + "enumDescriptions": [ + "CLUSTER_VIEW_UNSPECIFIED Not specified, equivalent to BASIC.", + "BASIC server responses include all the relevant cluster details, excluding Cluster.ContinuousBackupInfo.EarliestRestorableTime and other view-specific fields. The default value.", + "CONTINUOUS_BACKUP response returns all the fields from BASIC plus the earliest restorable time if continuous backups are enabled. May increase latency." + ], + "location": "query", + "type": "string" + } + }, + "path": "v1alpha/{+name}", + "response": { + "$ref": "Cluster" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "list": { + "description": "Lists Clusters in a given project and location.", + "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/clusters", + "httpMethod": "GET", + "id": "alloydb.projects.locations.clusters.list", + "parameterOrder": [ + "parent" + ], + "parameters": { + "filter": { + "description": "Optional. Filtering results", + "location": "query", + "type": "string" + }, + "orderBy": { + "description": "Optional. Hint for how to order the results", + "location": "query", + "type": "string" + }, + "pageSize": { + "description": "Optional. Requested page size. Server may return fewer items than requested. If unspecified, server will pick an appropriate default.", + "format": "int32", + "location": "query", + "type": "integer" + }, + "pageToken": { + "description": "A token identifying a page of results the server should return.", + "location": "query", + "type": "string" + }, + "parent": { + "description": "Required. The name of the parent resource. For the required format, see the comment on the Cluster.name field. Additionally, you can perform an aggregated list operation by specifying a value with the following format: * projects/{project}/locations/-", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1alpha/{+parent}/clusters", + "response": { + "$ref": "ListClustersResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "patch": { + "description": "Updates the parameters of a single Cluster.", + "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/clusters/{clustersId}", + "httpMethod": "PATCH", + "id": "alloydb.projects.locations.clusters.patch", + "parameterOrder": [ + "name" + ], + "parameters": { + "allowMissing": { + "description": "Optional. If set to true, update succeeds even if cluster is not found. In that case, a new cluster is created and `update_mask` is ignored.", + "location": "query", + "type": "boolean" + }, + "name": { + "description": "Output only. The name of the cluster resource with the format: * projects/{project}/locations/{region}/clusters/{cluster_id} where the cluster ID segment should satisfy the regex expression `[a-z0-9-]+`. For more details see https://google.aip.dev/122. The prefix of the cluster resource name is the name of the parent resource: * projects/{project}/locations/{region}", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/clusters/[^/]+$", + "required": true, + "type": "string" + }, + "requestId": { + "description": "Optional. An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. The server will guarantee that for at least 60 minutes since the first request. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", + "location": "query", + "type": "string" + }, + "updateMask": { + "description": "Optional. Field mask is used to specify the fields to be overwritten in the Cluster resource by the update. The fields specified in the update_mask are relative to the resource, not the full request. A field will be overwritten if it is in the mask. If the user does not provide a mask then all fields will be overwritten.", + "format": "google-fieldmask", + "location": "query", + "type": "string" + }, + "validateOnly": { + "description": "Optional. If set, performs request validation (e.g. permission checks and any other type of validation), but do not actually execute the update request.", + "location": "query", + "type": "boolean" + } + }, + "path": "v1alpha/{+name}", + "request": { + "$ref": "Cluster" + }, + "response": { + "$ref": "Operation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "promote": { + "description": "Promotes a SECONDARY cluster. This turns down replication from the PRIMARY cluster and promotes a secondary cluster into its own standalone cluster. Imperative only.", + "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/clusters/{clustersId}:promote", + "httpMethod": "POST", + "id": "alloydb.projects.locations.clusters.promote", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Required. The name of the resource. For the required format, see the comment on the Cluster.name field", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/clusters/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1alpha/{+name}:promote", + "request": { + "$ref": "PromoteClusterRequest" + }, + "response": { + "$ref": "Operation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "restore": { + "description": "Creates a new Cluster in a given project and location, with a volume restored from the provided source, either a backup ID or a point-in-time and a source cluster.", + "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/clusters:restore", + "httpMethod": "POST", + "id": "alloydb.projects.locations.clusters.restore", + "parameterOrder": [ + "parent" + ], + "parameters": { + "parent": { + "description": "Required. The name of the parent resource. For the required format, see the comment on the Cluster.name field.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1alpha/{+parent}/clusters:restore", + "request": { + "$ref": "RestoreClusterRequest" + }, + "response": { + "$ref": "Operation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + } + }, + "resources": { + "instances": { + "methods": { + "create": { + "description": "Creates a new Instance in a given project and location.", + "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/clusters/{clustersId}/instances", + "httpMethod": "POST", + "id": "alloydb.projects.locations.clusters.instances.create", + "parameterOrder": [ + "parent" + ], + "parameters": { + "instanceId": { + "description": "Required. ID of the requesting object.", + "location": "query", + "type": "string" + }, + "parent": { + "description": "Required. The name of the parent resource. For the required format, see the comment on the Instance.name field.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/clusters/[^/]+$", + "required": true, + "type": "string" + }, + "requestId": { + "description": "Optional. An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. The server will guarantee that for at least 60 minutes since the first request. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", + "location": "query", + "type": "string" + }, + "validateOnly": { + "description": "Optional. If set, performs request validation (e.g. permission checks and any other type of validation), but do not actually execute the create request.", + "location": "query", + "type": "boolean" + } + }, + "path": "v1alpha/{+parent}/instances", + "request": { + "$ref": "Instance" + }, + "response": { + "$ref": "Operation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "createsecondary": { + "description": "Creates a new SECONDARY Instance in a given project and location.", + "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/clusters/{clustersId}/instances:createsecondary", + "httpMethod": "POST", + "id": "alloydb.projects.locations.clusters.instances.createsecondary", + "parameterOrder": [ + "parent" + ], + "parameters": { + "instanceId": { + "description": "Required. ID of the requesting object.", + "location": "query", + "type": "string" + }, + "parent": { + "description": "Required. The name of the parent resource. For the required format, see the comment on the Instance.name field.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/clusters/[^/]+$", + "required": true, + "type": "string" + }, + "requestId": { + "description": "Optional. An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. The server will guarantee that for at least 60 minutes since the first request. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", + "location": "query", + "type": "string" + }, + "validateOnly": { + "description": "Optional. If set, performs request validation (e.g. permission checks and any other type of validation), but do not actually execute the create request.", + "location": "query", + "type": "boolean" + } + }, + "path": "v1alpha/{+parent}/instances:createsecondary", + "request": { + "$ref": "Instance" + }, + "response": { + "$ref": "Operation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "delete": { + "description": "Deletes a single Instance.", + "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/clusters/{clustersId}/instances/{instancesId}", + "httpMethod": "DELETE", + "id": "alloydb.projects.locations.clusters.instances.delete", + "parameterOrder": [ + "name" + ], + "parameters": { + "etag": { + "description": "Optional. The current etag of the Instance. If an etag is provided and does not match the current etag of the Instance, deletion will be blocked and an ABORTED error will be returned.", + "location": "query", + "type": "string" + }, + "name": { + "description": "Required. The name of the resource. For the required format, see the comment on the Instance.name field.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/clusters/[^/]+/instances/[^/]+$", + "required": true, + "type": "string" + }, + "requestId": { + "description": "Optional. An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. The server will guarantee that for at least 60 minutes after the first request. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", + "location": "query", + "type": "string" + }, + "validateOnly": { + "description": "Optional. If set, performs request validation (e.g. permission checks and any other type of validation), but do not actually execute the delete.", + "location": "query", + "type": "boolean" + } + }, + "path": "v1alpha/{+name}", + "response": { + "$ref": "Operation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "failover": { + "description": "Forces a Failover for a highly available instance. Failover promotes the HA standby instance as the new primary. Imperative only.", + "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/clusters/{clustersId}/instances/{instancesId}:failover", + "httpMethod": "POST", + "id": "alloydb.projects.locations.clusters.instances.failover", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Required. The name of the resource. For the required format, see the comment on the Instance.name field.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/clusters/[^/]+/instances/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1alpha/{+name}:failover", + "request": { + "$ref": "FailoverInstanceRequest" + }, + "response": { + "$ref": "Operation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "get": { + "description": "Gets details of a single Instance.", + "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/clusters/{clustersId}/instances/{instancesId}", + "httpMethod": "GET", + "id": "alloydb.projects.locations.clusters.instances.get", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Required. The name of the resource. For the required format, see the comment on the Instance.name field.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/clusters/[^/]+/instances/[^/]+$", + "required": true, + "type": "string" + }, + "view": { + "description": "The view of the instance to return.", + "enum": [ + "INSTANCE_VIEW_UNSPECIFIED", + "INSTANCE_VIEW_BASIC", + "INSTANCE_VIEW_FULL" + ], + "enumDescriptions": [ + "INSTANCE_VIEW_UNSPECIFIED Not specified, equivalent to BASIC.", + "BASIC server responses for a primary or read instance include all the relevant instance details, excluding the details of each node in the instance. The default value.", + "FULL response is equivalent to BASIC for primary instance (for now). For read pool instance, this includes details of each node in the pool." + ], + "location": "query", + "type": "string" + } + }, + "path": "v1alpha/{+name}", + "response": { + "$ref": "Instance" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "getConnectionInfo": { + "description": "Get instance metadata used for a connection.", + "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/clusters/{clustersId}/instances/{instancesId}/connectionInfo", + "httpMethod": "GET", + "id": "alloydb.projects.locations.clusters.instances.getConnectionInfo", + "parameterOrder": [ + "parent" + ], + "parameters": { + "parent": { + "description": "Required. The name of the parent resource. The required format is: projects/{project}/locations/{location}/clusters/{cluster}/instances/{instance}", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/clusters/[^/]+/instances/[^/]+$", + "required": true, + "type": "string" + }, + "requestId": { + "description": "Optional. An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. The server will guarantee that for at least 60 minutes after the first request. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", + "location": "query", + "type": "string" + } + }, + "path": "v1alpha/{+parent}/connectionInfo", + "response": { + "$ref": "ConnectionInfo" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "injectFault": { + "description": "Injects fault in an instance. Imperative only.", + "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/clusters/{clustersId}/instances/{instancesId}:injectFault", + "httpMethod": "POST", + "id": "alloydb.projects.locations.clusters.instances.injectFault", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Required. The name of the resource. For the required format, see the comment on the Instance.name field.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/clusters/[^/]+/instances/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1alpha/{+name}:injectFault", + "request": { + "$ref": "InjectFaultRequest" + }, + "response": { + "$ref": "Operation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "list": { + "description": "Lists Instances in a given project and location.", + "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/clusters/{clustersId}/instances", + "httpMethod": "GET", + "id": "alloydb.projects.locations.clusters.instances.list", + "parameterOrder": [ + "parent" + ], + "parameters": { + "filter": { + "description": "Optional. Filtering results", + "location": "query", + "type": "string" + }, + "orderBy": { + "description": "Optional. Hint for how to order the results", + "location": "query", + "type": "string" + }, + "pageSize": { + "description": "Optional. Requested page size. Server may return fewer items than requested. If unspecified, server will pick an appropriate default.", + "format": "int32", + "location": "query", + "type": "integer" + }, + "pageToken": { + "description": "A token identifying a page of results the server should return.", + "location": "query", + "type": "string" + }, + "parent": { + "description": "Required. The name of the parent resource. For the required format, see the comment on the Instance.name field. Additionally, you can perform an aggregated list operation by specifying a value with one of the following formats: * projects/{project}/locations/-/clusters/- * projects/{project}/locations/{region}/clusters/-", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/clusters/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1alpha/{+parent}/instances", + "response": { + "$ref": "ListInstancesResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "patch": { + "description": "Updates the parameters of a single Instance.", + "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/clusters/{clustersId}/instances/{instancesId}", + "httpMethod": "PATCH", + "id": "alloydb.projects.locations.clusters.instances.patch", + "parameterOrder": [ + "name" + ], + "parameters": { + "allowMissing": { + "description": "Optional. If set to true, update succeeds even if instance is not found. In that case, a new instance is created and `update_mask` is ignored.", + "location": "query", + "type": "boolean" + }, + "name": { + "description": "Output only. The name of the instance resource with the format: * projects/{project}/locations/{region}/clusters/{cluster_id}/instances/{instance_id} where the cluster and instance ID segments should satisfy the regex expression `[a-z]([a-z0-9-]{0,61}[a-z0-9])?`, e.g. 1-63 characters of lowercase letters, numbers, and dashes, starting with a letter, and ending with a letter or number. For more details see https://google.aip.dev/122. The prefix of the instance resource name is the name of the parent resource: * projects/{project}/locations/{region}/clusters/{cluster_id}", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/clusters/[^/]+/instances/[^/]+$", + "required": true, + "type": "string" + }, + "requestId": { + "description": "Optional. An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. The server will guarantee that for at least 60 minutes since the first request. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", + "location": "query", + "type": "string" + }, + "updateMask": { + "description": "Optional. Field mask is used to specify the fields to be overwritten in the Instance resource by the update. The fields specified in the update_mask are relative to the resource, not the full request. A field will be overwritten if it is in the mask. If the user does not provide a mask then all fields will be overwritten.", + "format": "google-fieldmask", + "location": "query", + "type": "string" + }, + "validateOnly": { + "description": "Optional. If set, performs request validation (e.g. permission checks and any other type of validation), but do not actually execute the update request.", + "location": "query", + "type": "boolean" + } + }, + "path": "v1alpha/{+name}", + "request": { + "$ref": "Instance" + }, + "response": { + "$ref": "Operation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "restart": { + "description": "Restart an Instance in a cluster. Imperative only.", + "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/clusters/{clustersId}/instances/{instancesId}:restart", + "httpMethod": "POST", + "id": "alloydb.projects.locations.clusters.instances.restart", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Required. The name of the resource. For the required format, see the comment on the Instance.name field.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/clusters/[^/]+/instances/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1alpha/{+name}:restart", + "request": { + "$ref": "RestartInstanceRequest" + }, + "response": { + "$ref": "Operation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + } + } + }, + "users": { + "methods": { + "create": { + "description": "Creates a new User in a given project, location, and cluster.", + "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/clusters/{clustersId}/users", + "httpMethod": "POST", + "id": "alloydb.projects.locations.clusters.users.create", + "parameterOrder": [ + "parent" + ], + "parameters": { + "parent": { + "description": "Required. Value for parent.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/clusters/[^/]+$", + "required": true, + "type": "string" + }, + "requestId": { + "description": "Optional. An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. The server will guarantee that for at least 60 minutes since the first request. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", + "location": "query", + "type": "string" + }, + "userId": { + "description": "Required. ID of the requesting object.", + "location": "query", + "type": "string" + }, + "validateOnly": { + "description": "Optional. If set, the backend validates the request, but doesn't actually execute it.", + "location": "query", + "type": "boolean" + } + }, + "path": "v1alpha/{+parent}/users", + "request": { + "$ref": "User" + }, + "response": { + "$ref": "User" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "delete": { + "description": "Deletes a single User.", + "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/clusters/{clustersId}/users/{usersId}", + "httpMethod": "DELETE", + "id": "alloydb.projects.locations.clusters.users.delete", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Required. The name of the resource. For the required format, see the comment on the User.name field.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/clusters/[^/]+/users/[^/]+$", + "required": true, + "type": "string" + }, + "requestId": { + "description": "Optional. An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. The server will guarantee that for at least 60 minutes after the first request. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", + "location": "query", + "type": "string" + }, + "validateOnly": { + "description": "Optional. If set, the backend validates the request, but doesn't actually execute it.", + "location": "query", + "type": "boolean" + } + }, + "path": "v1alpha/{+name}", + "response": { + "$ref": "Empty" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "get": { + "description": "Gets details of a single User.", + "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/clusters/{clustersId}/users/{usersId}", + "httpMethod": "GET", + "id": "alloydb.projects.locations.clusters.users.get", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Required. The name of the resource. For the required format, see the comment on the User.name field.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/clusters/[^/]+/users/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1alpha/{+name}", + "response": { + "$ref": "User" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "list": { + "description": "Lists Users in a given project and location.", + "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/clusters/{clustersId}/users", + "httpMethod": "GET", + "id": "alloydb.projects.locations.clusters.users.list", + "parameterOrder": [ + "parent" + ], + "parameters": { + "filter": { + "description": "Optional. Filtering results", + "location": "query", + "type": "string" + }, + "orderBy": { + "description": "Optional. Hint for how to order the results", + "location": "query", + "type": "string" + }, + "pageSize": { + "description": "Optional. Requested page size. Server may return fewer items than requested. If unspecified, server will pick an appropriate default.", + "format": "int32", + "location": "query", + "type": "integer" + }, + "pageToken": { + "description": "Optional. A token identifying a page of results the server should return.", + "location": "query", + "type": "string" + }, + "parent": { + "description": "Required. Parent value for ListUsersRequest", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/clusters/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1alpha/{+parent}/users", + "response": { + "$ref": "ListUsersResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "patch": { + "description": "Updates the parameters of a single User.", + "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/clusters/{clustersId}/users/{usersId}", + "httpMethod": "PATCH", + "id": "alloydb.projects.locations.clusters.users.patch", + "parameterOrder": [ + "name" + ], + "parameters": { + "allowMissing": { + "description": "Optional. Allow missing fields in the update mask.", + "location": "query", + "type": "boolean" + }, + "name": { + "description": "Output only. Name of the resource in the form of projects/{project}/locations/{location}/cluster/{cluster}/users/{user}.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/clusters/[^/]+/users/[^/]+$", + "required": true, + "type": "string" + }, + "requestId": { + "description": "Optional. An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. The server will guarantee that for at least 60 minutes since the first request. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", + "location": "query", + "type": "string" + }, + "updateMask": { + "description": "Optional. Field mask is used to specify the fields to be overwritten in the User resource by the update. The fields specified in the update_mask are relative to the resource, not the full request. A field will be overwritten if it is in the mask. If the user does not provide a mask then all fields will be overwritten.", + "format": "google-fieldmask", + "location": "query", + "type": "string" + }, + "validateOnly": { + "description": "Optional. If set, the backend validates the request, but doesn't actually execute it.", + "location": "query", + "type": "boolean" + } + }, + "path": "v1alpha/{+name}", + "request": { + "$ref": "User" + }, + "response": { + "$ref": "User" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + } + } + } + } + }, + "operations": { + "methods": { + "cancel": { + "description": "Starts asynchronous cancellation on a long-running operation. The server makes a best effort to cancel the operation, but success is not guaranteed. If the server doesn't support this method, it returns `google.rpc.Code.UNIMPLEMENTED`. Clients can use Operations.GetOperation or other methods to check whether the cancellation succeeded or whether the operation completed despite cancellation. On successful cancellation, the operation is not deleted; instead, it becomes an operation with an Operation.error value with a google.rpc.Status.code of 1, corresponding to `Code.CANCELLED`.", + "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/operations/{operationsId}:cancel", + "httpMethod": "POST", + "id": "alloydb.projects.locations.operations.cancel", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "The name of the operation resource to be cancelled.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/operations/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1alpha/{+name}:cancel", + "request": { + "$ref": "CancelOperationRequest" + }, + "response": { + "$ref": "Empty" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "delete": { + "description": "Deletes a long-running operation. This method indicates that the client is no longer interested in the operation result. It does not cancel the operation. If the server doesn't support this method, it returns `google.rpc.Code.UNIMPLEMENTED`.", + "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/operations/{operationsId}", + "httpMethod": "DELETE", + "id": "alloydb.projects.locations.operations.delete", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "The name of the operation resource to be deleted.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/operations/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1alpha/{+name}", + "response": { + "$ref": "Empty" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "get": { + "description": "Gets the latest state of a long-running operation. Clients can use this method to poll the operation result at intervals as recommended by the API service.", + "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/operations/{operationsId}", + "httpMethod": "GET", + "id": "alloydb.projects.locations.operations.get", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "The name of the operation resource.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/operations/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1alpha/{+name}", + "response": { + "$ref": "Operation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "list": { + "description": "Lists operations that match the specified filter in the request. If the server doesn't support this method, it returns `UNIMPLEMENTED`.", + "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/operations", + "httpMethod": "GET", + "id": "alloydb.projects.locations.operations.list", + "parameterOrder": [ + "name" + ], + "parameters": { + "filter": { + "description": "The standard list filter.", + "location": "query", + "type": "string" + }, + "name": { + "description": "The name of the operation's parent resource.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+$", + "required": true, + "type": "string" + }, + "pageSize": { + "description": "The standard list page size.", + "format": "int32", + "location": "query", + "type": "integer" + }, + "pageToken": { + "description": "The standard list page token.", + "location": "query", + "type": "string" + } + }, + "path": "v1alpha/{+name}/operations", + "response": { + "$ref": "ListOperationsResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + } + } + }, + "supportedDatabaseFlags": { + "methods": { + "list": { + "description": "Lists SupportedDatabaseFlags for a given project and location.", + "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/supportedDatabaseFlags", + "httpMethod": "GET", + "id": "alloydb.projects.locations.supportedDatabaseFlags.list", + "parameterOrder": [ + "parent" + ], + "parameters": { + "pageSize": { + "description": "Requested page size. Server may return fewer items than requested. If unspecified, server will pick an appropriate default.", + "format": "int32", + "location": "query", + "type": "integer" + }, + "pageToken": { + "description": "A token identifying a page of results the server should return.", + "location": "query", + "type": "string" + }, + "parent": { + "description": "Required. The name of the parent resource. The required format is: * projects/{project}/locations/{location} Regardless of the parent specified here, as long it is contains a valid project and location, the service will return a static list of supported flags resources. Note that we do not yet support region-specific flags.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1alpha/{+parent}/supportedDatabaseFlags", + "response": { + "$ref": "ListSupportedDatabaseFlagsResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + } + } + } + } + } + } + } + }, + "revision": "20230821", + "rootUrl": "https://alloydb.googleapis.com/", + "schemas": { + "AutomatedBackupPolicy": { + "description": "Message describing the user-specified automated backup policy. All fields in the automated backup policy are optional. Defaults for each field are provided if they are not set.", + "id": "AutomatedBackupPolicy", + "properties": { + "backupWindow": { + "description": "The length of the time window during which a backup can be taken. If a backup does not succeed within this time window, it will be canceled and considered failed. The backup window must be at least 5 minutes long. There is no upper bound on the window. If not set, it defaults to 1 hour.", + "format": "google-duration", + "type": "string" + }, + "enabled": { + "description": "Whether automated automated backups are enabled. If not set, defaults to true.", + "type": "boolean" + }, + "encryptionConfig": { + "$ref": "EncryptionConfig", + "description": "Optional. The encryption config can be specified to encrypt the backups with a customer-managed encryption key (CMEK). When this field is not specified, the backup will then use default encryption scheme to protect the user data." + }, + "labels": { + "additionalProperties": { + "type": "string" + }, + "description": "Labels to apply to backups created using this configuration.", + "type": "object" + }, + "location": { + "description": "The location where the backup will be stored. Currently, the only supported option is to store the backup in the same region as the cluster. If empty, defaults to the region of the cluster.", + "type": "string" + }, + "quantityBasedRetention": { + "$ref": "QuantityBasedRetention", + "description": "Quantity-based Backup retention policy to retain recent backups." + }, + "timeBasedRetention": { + "$ref": "TimeBasedRetention", + "description": "Time-based Backup retention policy." + }, + "weeklySchedule": { + "$ref": "WeeklySchedule", + "description": "Weekly schedule for the Backup." + } + }, + "type": "object" + }, + "Backup": { + "description": "Message describing Backup object", + "id": "Backup", + "properties": { + "annotations": { + "additionalProperties": { + "type": "string" + }, + "description": "Annotations to allow client tools to store small amount of arbitrary data. This is distinct from labels. https://google.aip.dev/128", + "type": "object" + }, + "clusterName": { + "description": "Required. The full resource name of the backup source cluster (e.g., projects/{project}/locations/{region}/clusters/{cluster_id}).", + "type": "string" + }, + "clusterUid": { + "description": "Output only. The system-generated UID of the cluster which was used to create this resource.", + "readOnly": true, + "type": "string" + }, + "createTime": { + "description": "Output only. Create time stamp", + "format": "google-datetime", + "readOnly": true, + "type": "string" + }, + "databaseVersion": { + "description": "Output only. The database engine major version of the cluster this backup was created from. Any restored cluster created from this backup will have the same database version.", + "enum": [ + "DATABASE_VERSION_UNSPECIFIED", + "POSTGRES_13", + "POSTGRES_14", + "POSTGRES_15" + ], + "enumDeprecated": [ + false, + true, + false, + false + ], + "enumDescriptions": [ + "This is an unknown database version.", + "DEPRECATED - The database version is Postgres 13.", + "The database version is Postgres 14.", + "The database version is Postgres 15." + ], + "readOnly": true, + "type": "string" + }, + "deleteTime": { + "description": "Output only. Delete time stamp", + "format": "google-datetime", + "readOnly": true, + "type": "string" + }, + "description": { + "description": "User-provided description of the backup.", + "type": "string" + }, + "displayName": { + "description": "User-settable and human-readable display name for the Backup.", + "type": "string" + }, + "encryptionConfig": { + "$ref": "EncryptionConfig", + "description": "Optional. The encryption config can be specified to encrypt the backup with a customer-managed encryption key (CMEK). When this field is not specified, the backup will then use default encryption scheme to protect the user data." + }, + "encryptionInfo": { + "$ref": "EncryptionInfo", + "description": "Output only. The encryption information for the backup.", + "readOnly": true + }, + "etag": { + "description": "For Resource freshness validation (https://google.aip.dev/154)", + "type": "string" + }, + "expiryQuantity": { + "$ref": "QuantityBasedExpiry", + "description": "Output only. The QuantityBasedExpiry of the backup, specified by the backup's retention policy. Once the expiry quantity is over retention, the backup is eligible to be garbage collected.", + "readOnly": true + }, + "expiryTime": { + "description": "Output only. The time at which after the backup is eligible to be garbage collected. It is the duration specified by the backup's retention policy, added to the backup's create_time.", + "format": "google-datetime", + "readOnly": true, + "type": "string" + }, + "labels": { + "additionalProperties": { + "type": "string" + }, + "description": "Labels as key value pairs", + "type": "object" + }, + "name": { + "description": "Output only. The name of the backup resource with the format: * projects/{project}/locations/{region}/backups/{backup_id} where the cluster and backup ID segments should satisfy the regex expression `[a-z]([a-z0-9-]{0,61}[a-z0-9])?`, e.g. 1-63 characters of lowercase letters, numbers, and dashes, starting with a letter, and ending with a letter or number. For more details see https://google.aip.dev/122. The prefix of the backup resource name is the name of the parent resource: * projects/{project}/locations/{region}", + "readOnly": true, + "type": "string" + }, + "reconciling": { + "description": "Output only. Reconciling (https://google.aip.dev/128#reconciliation), if true, indicates that the service is actively updating the resource. This can happen due to user-triggered updates or system actions like failover or maintenance.", + "readOnly": true, + "type": "boolean" + }, + "satisfiesPzs": { + "description": "Reserved for future use.", + "type": "boolean" + }, + "sizeBytes": { + "description": "Output only. The size of the backup in bytes.", + "format": "int64", + "readOnly": true, + "type": "string" + }, + "state": { + "description": "Output only. The current state of the backup.", + "enum": [ + "STATE_UNSPECIFIED", + "READY", + "CREATING", + "FAILED", + "DELETING" + ], + "enumDescriptions": [ + "The state of the backup is unknown.", + "The backup is ready.", + "The backup is creating.", + "The backup failed.", + "The backup is being deleted." + ], + "readOnly": true, + "type": "string" + }, + "type": { + "description": "The backup type, which suggests the trigger for the backup.", + "enum": [ + "TYPE_UNSPECIFIED", + "ON_DEMAND", + "AUTOMATED", + "CONTINUOUS" + ], + "enumDescriptions": [ + "Backup Type is unknown.", + "ON_DEMAND backups that were triggered by the customer (e.g., not AUTOMATED).", + "AUTOMATED backups triggered by the automated backups scheduler pursuant to an automated backup policy.", + "CONTINUOUS backups triggered by the automated backups scheduler due to a continuous backup policy." + ], + "type": "string" + }, + "uid": { + "description": "Output only. The system-generated UID of the resource. The UID is assigned when the resource is created, and it is retained until it is deleted.", + "readOnly": true, + "type": "string" + }, + "updateTime": { + "description": "Output only. Update time stamp", + "format": "google-datetime", + "readOnly": true, + "type": "string" + } + }, + "type": "object" + }, + "BackupSource": { + "description": "Message describing a BackupSource.", + "id": "BackupSource", + "properties": { + "backupName": { + "description": "Required. The name of the backup resource with the format: * projects/{project}/locations/{region}/backups/{backup_id}", + "type": "string" + }, + "backupUid": { + "description": "Output only. The system-generated UID of the backup which was used to create this resource. The UID is generated when the backup is created, and it is retained until the backup is deleted.", + "readOnly": true, + "type": "string" + } + }, + "type": "object" + }, + "CancelOperationRequest": { + "description": "The request message for Operations.CancelOperation.", + "id": "CancelOperationRequest", + "properties": {}, + "type": "object" + }, + "ClientConnectionConfig": { + "description": "Client connection configuration", + "id": "ClientConnectionConfig", + "properties": { + "requireConnectors": { + "description": "Optional. Configuration to enforce connectors only (ex: AuthProxy) connections to the database.", + "type": "boolean" + }, + "sslConfig": { + "$ref": "SslConfig", + "description": "Optional. SSL config option for this instance." + } + }, + "type": "object" + }, + "CloudControl2SharedOperationsReconciliationOperationMetadata": { + "description": "Operation metadata returned by the CLH during resource state reconciliation.", + "id": "CloudControl2SharedOperationsReconciliationOperationMetadata", + "properties": { + "deleteResource": { + "deprecated": true, + "description": "DEPRECATED. Use exclusive_action instead.", + "type": "boolean" + }, + "exclusiveAction": { + "description": "Excluisive action returned by the CLH.", + "enum": [ + "UNKNOWN_REPAIR_ACTION", + "DELETE", + "RETRY" + ], + "enumDeprecated": [ + false, + true, + false + ], + "enumDescriptions": [ + "Unknown repair action.", + "The resource has to be deleted. When using this bit, the CLH should fail the operation. DEPRECATED. Instead use DELETE_RESOURCE OperationSignal in SideChannel.", + "This resource could not be repaired but the repair should be tried again at a later time. This can happen if there is a dependency that needs to be resolved first- e.g. if a parent resource must be repaired before a child resource." + ], + "type": "string" + } + }, + "type": "object" + }, + "Cluster": { + "description": "A cluster is a collection of regional AlloyDB resources. It can include a primary instance and one or more read pool instances. All cluster resources share a storage layer, which scales as needed.", + "id": "Cluster", + "properties": { + "annotations": { + "additionalProperties": { + "type": "string" + }, + "description": "Annotations to allow client tools to store small amount of arbitrary data. This is distinct from labels. https://google.aip.dev/128", + "type": "object" + }, + "automatedBackupPolicy": { + "$ref": "AutomatedBackupPolicy", + "description": "The automated backup policy for this cluster. If no policy is provided then the default policy will be used. If backups are supported for the cluster, the default policy takes one backup a day, has a backup window of 1 hour, and retains backups for 14 days. For more information on the defaults, consult the documentation for the message type." + }, + "backupSource": { + "$ref": "BackupSource", + "description": "Output only. Cluster created from backup.", + "readOnly": true + }, + "clusterType": { + "description": "Output only. The type of the cluster. This is an output-only field and it's populated at the Cluster creation time or the Cluster promotion time. The cluster type is determined by which RPC was used to create the cluster (i.e. `CreateCluster` vs. `CreateSecondaryCluster`", + "enum": [ + "CLUSTER_TYPE_UNSPECIFIED", + "PRIMARY", + "SECONDARY" + ], + "enumDescriptions": [ + "The type of the cluster is unknown.", + "Primary cluster that support read and write operations.", + "Secondary cluster that is replicating from another region. This only supports read." + ], + "readOnly": true, + "type": "string" + }, + "continuousBackupConfig": { + "$ref": "ContinuousBackupConfig", + "description": "Optional. Continuous backup configuration for this cluster." + }, + "continuousBackupInfo": { + "$ref": "ContinuousBackupInfo", + "description": "Output only. Continuous backup properties for this cluster.", + "readOnly": true + }, + "createTime": { + "description": "Output only. Create time stamp", + "format": "google-datetime", + "readOnly": true, + "type": "string" + }, + "databaseVersion": { + "description": "Optional. The database engine major version. This is an optional field and it is populated at the Cluster creation time. If a database version is not supplied at cluster creation time, then a default database version will be used.", + "enum": [ + "DATABASE_VERSION_UNSPECIFIED", + "POSTGRES_13", + "POSTGRES_14", + "POSTGRES_15" + ], + "enumDeprecated": [ + false, + true, + false, + false + ], + "enumDescriptions": [ + "This is an unknown database version.", + "DEPRECATED - The database version is Postgres 13.", + "The database version is Postgres 14.", + "The database version is Postgres 15." + ], + "type": "string" + }, + "deleteTime": { + "description": "Output only. Delete time stamp", + "format": "google-datetime", + "readOnly": true, + "type": "string" + }, + "displayName": { + "description": "User-settable and human-readable display name for the Cluster.", + "type": "string" + }, + "encryptionConfig": { + "$ref": "EncryptionConfig", + "description": "Optional. The encryption config can be specified to encrypt the data disks and other persistent data resources of a cluster with a customer-managed encryption key (CMEK). When this field is not specified, the cluster will then use default encryption scheme to protect the user data." + }, + "encryptionInfo": { + "$ref": "EncryptionInfo", + "description": "Output only. The encryption information for the cluster.", + "readOnly": true + }, + "etag": { + "description": "For Resource freshness validation (https://google.aip.dev/154)", + "type": "string" + }, + "initialUser": { + "$ref": "UserPassword", + "description": "Input only. Initial user to setup during cluster creation. Required. If used in `RestoreCluster` this is ignored." + }, + "labels": { + "additionalProperties": { + "type": "string" + }, + "description": "Labels as key value pairs", + "type": "object" + }, + "migrationSource": { + "$ref": "MigrationSource", + "description": "Output only. Cluster created via DMS migration.", + "readOnly": true + }, + "name": { + "description": "Output only. The name of the cluster resource with the format: * projects/{project}/locations/{region}/clusters/{cluster_id} where the cluster ID segment should satisfy the regex expression `[a-z0-9-]+`. For more details see https://google.aip.dev/122. The prefix of the cluster resource name is the name of the parent resource: * projects/{project}/locations/{region}", + "readOnly": true, + "type": "string" + }, + "network": { + "deprecated": true, + "description": "Required. The resource link for the VPC network in which cluster resources are created and from which they are accessible via Private IP. The network must belong to the same project as the cluster. It is specified in the form: \"projects/{project}/global/networks/{network_id}\". This is required to create a cluster. It can be updated, but it cannot be removed. Deprecated, use network_config.network instead.", + "type": "string" + }, + "networkConfig": { + "$ref": "NetworkConfig" + }, + "primaryConfig": { + "$ref": "PrimaryConfig", + "description": "Output only. Cross Region replication config specific to PRIMARY cluster.", + "readOnly": true + }, + "reconciling": { + "description": "Output only. Reconciling (https://google.aip.dev/128#reconciliation). Set to true if the current state of Cluster does not match the user's intended state, and the service is actively updating the resource to reconcile them. This can happen due to user-triggered updates or system actions like failover or maintenance.", + "readOnly": true, + "type": "boolean" + }, + "satisfiesPzs": { + "description": "Reserved for future use.", + "type": "boolean" + }, + "secondaryConfig": { + "$ref": "SecondaryConfig", + "description": "Cross Region replication config specific to SECONDARY cluster." + }, + "sslConfig": { + "$ref": "SslConfig", + "deprecated": true, + "description": "SSL configuration for this AlloyDB cluster." + }, + "state": { + "description": "Output only. The current serving state of the cluster.", + "enum": [ + "STATE_UNSPECIFIED", + "READY", + "STOPPED", + "EMPTY", + "CREATING", + "DELETING", + "FAILED", + "BOOTSTRAPPING", + "MAINTENANCE", + "PROMOTING" + ], + "enumDescriptions": [ + "The state of the cluster is unknown.", + "The cluster is active and running.", + "The cluster is stopped. All instances in the cluster are stopped. Customers can start a stopped cluster at any point and all their instances will come back to life with same names and IP resources. In this state, customer pays for storage. Associated backups could also be present in a stopped cluster.", + "The cluster is empty and has no associated resources. All instances, associated storage and backups have been deleted.", + "The cluster is being created.", + "The cluster is being deleted.", + "The creation of the cluster failed.", + "The cluster is bootstrapping with data from some other source. Direct mutations to the cluster (e.g. adding read pool) are not allowed.", + "The cluster is under maintenance. AlloyDB regularly performs maintenance and upgrades on customer clusters. Updates on the cluster are not allowed while the cluster is in this state.", + "The cluster is being promoted." + ], + "readOnly": true, + "type": "string" + }, + "uid": { + "description": "Output only. The system-generated UID of the resource. The UID is assigned when the resource is created, and it is retained until it is deleted.", + "readOnly": true, + "type": "string" + }, + "updateTime": { + "description": "Output only. Update time stamp", + "format": "google-datetime", + "readOnly": true, + "type": "string" + } + }, + "type": "object" + }, + "ConnectionInfo": { + "description": "ConnectionInfo singleton resource. https://google.aip.dev/156", + "id": "ConnectionInfo", + "properties": { + "instanceUid": { + "description": "Output only. The unique ID of the Instance.", + "readOnly": true, + "type": "string" + }, + "ipAddress": { + "description": "Output only. The private network IP address for the Instance. This is the default IP for the instance and is always created (even if enable_public_ip is set). This is the connection endpoint for an end-user application.", + "readOnly": true, + "type": "string" + }, + "name": { + "description": "The name of the ConnectionInfo singleton resource, e.g.: projects/{project}/locations/{location}/clusters/*/instances/*/connectionInfo This field currently has no semantic meaning.", + "type": "string" + }, + "pemCertificateChain": { + "deprecated": true, + "description": "Output only. The pem-encoded chain that may be used to verify the X.509 certificate. Expected to be in issuer-to-root order according to RFC 5246.", + "items": { + "type": "string" + }, + "readOnly": true, + "type": "array" + } + }, + "type": "object" + }, + "ContinuousBackupConfig": { + "description": "ContinuousBackupConfig describes the continuous backups recovery configurations of a cluster.", + "id": "ContinuousBackupConfig", + "properties": { + "enabled": { + "description": "Whether ContinuousBackup is enabled.", + "type": "boolean" + }, + "encryptionConfig": { + "$ref": "EncryptionConfig", + "description": "The encryption config can be specified to encrypt the backups with a customer-managed encryption key (CMEK). When this field is not specified, the backup will then use default encryption scheme to protect the user data." + }, + "recoveryWindowDays": { + "description": "The number of days that are eligible to restore from using PITR. To support the entire recovery window, backups and logs are retained for one day more than the recovery window. If not set, defaults to 14 days.", + "format": "int32", + "type": "integer" + } + }, + "type": "object" + }, + "ContinuousBackupInfo": { + "description": "ContinuousBackupInfo describes the continuous backup properties of a cluster.", + "id": "ContinuousBackupInfo", + "properties": { + "earliestRestorableTime": { + "description": "Output only. The earliest restorable time that can be restored to. Output only field.", + "format": "google-datetime", + "readOnly": true, + "type": "string" + }, + "enabledTime": { + "description": "Output only. When ContinuousBackup was most recently enabled. Set to null if ContinuousBackup is not enabled.", + "format": "google-datetime", + "readOnly": true, + "type": "string" + }, + "encryptionInfo": { + "$ref": "EncryptionInfo", + "description": "Output only. The encryption information for the WALs and backups required for ContinuousBackup.", + "readOnly": true + }, + "schedule": { + "description": "Output only. Days of the week on which a continuous backup is taken. Output only field. Ignored if passed into the request.", + "items": { + "enum": [ + "DAY_OF_WEEK_UNSPECIFIED", + "MONDAY", + "TUESDAY", + "WEDNESDAY", + "THURSDAY", + "FRIDAY", + "SATURDAY", + "SUNDAY" + ], + "enumDescriptions": [ + "The day of the week is unspecified.", + "Monday", + "Tuesday", + "Wednesday", + "Thursday", + "Friday", + "Saturday", + "Sunday" + ], + "type": "string" + }, + "readOnly": true, + "type": "array" + } + }, + "type": "object" + }, + "ContinuousBackupSource": { + "description": "Message describing a ContinuousBackupSource.", + "id": "ContinuousBackupSource", + "properties": { + "cluster": { + "description": "Required. The source cluster from which to restore. This cluster must have continuous backup enabled for this operation to succeed. For the required format, see the comment on the Cluster.name field.", + "type": "string" + }, + "pointInTime": { + "description": "Required. The point in time to restore to.", + "format": "google-datetime", + "type": "string" + } + }, + "type": "object" + }, + "Empty": { + "description": "A generic empty message that you can re-use to avoid defining duplicated empty messages in your APIs. A typical example is to use it as the request or the response type of an API method. For instance: service Foo { rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty); }", + "id": "Empty", + "properties": {}, + "type": "object" + }, + "EncryptionConfig": { + "description": "EncryptionConfig describes the encryption config of a cluster or a backup that is encrypted with a CMEK (customer-managed encryption key).", + "id": "EncryptionConfig", + "properties": { + "kmsKeyName": { + "description": "The fully-qualified resource name of the KMS key. Each Cloud KMS key is regionalized and has the following format: projects/[PROJECT]/locations/[REGION]/keyRings/[RING]/cryptoKeys/[KEY_NAME]", + "type": "string" + } + }, + "type": "object" + }, + "EncryptionInfo": { + "description": "EncryptionInfo describes the encryption information of a cluster or a backup.", + "id": "EncryptionInfo", + "properties": { + "encryptionType": { + "description": "Output only. Type of encryption.", + "enum": [ + "TYPE_UNSPECIFIED", + "GOOGLE_DEFAULT_ENCRYPTION", + "CUSTOMER_MANAGED_ENCRYPTION" + ], + "enumDescriptions": [ + "Encryption type not specified. Defaults to GOOGLE_DEFAULT_ENCRYPTION.", + "The data is encrypted at rest with a key that is fully managed by Google. No key version will be populated. This is the default state.", + "The data is encrypted at rest with a key that is managed by the customer. KMS key versions will be populated." + ], + "readOnly": true, + "type": "string" + }, + "kmsKeyVersions": { + "description": "Output only. Cloud KMS key versions that are being used to protect the database or the backup.", + "items": { + "type": "string" + }, + "readOnly": true, + "type": "array" + } + }, + "type": "object" + }, + "FailoverInstanceRequest": { + "description": "Message for triggering failover on an Instance", + "id": "FailoverInstanceRequest", + "properties": { + "requestId": { + "description": "Optional. An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. The server will guarantee that for at least 60 minutes after the first request. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", + "type": "string" + }, + "validateOnly": { + "description": "Optional. If set, performs request validation (e.g. permission checks and any other type of validation), but do not actually execute the failover.", + "type": "boolean" + } + }, + "type": "object" + }, + "GenerateClientCertificateRequest": { + "description": "Message for requests to generate a client certificate signed by the Cluster CA.", + "id": "GenerateClientCertificateRequest", + "properties": { + "certDuration": { + "description": "Optional. An optional hint to the endpoint to generate the client certificate with the requested duration. The duration can be from 1 hour to 24 hours. The endpoint may or may not honor the hint. If the hint is left unspecified or is not honored, then the endpoint will pick an appropriate default duration.", + "format": "google-duration", + "type": "string" + }, + "pemCsr": { + "deprecated": true, + "description": "Optional. A pem-encoded X.509 certificate signing request (CSR).", + "type": "string" + }, + "publicKey": { + "description": "Optional. The public key from the client.", + "type": "string" + }, + "requestId": { + "description": "Optional. An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. The server will guarantee that for at least 60 minutes after the first request. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", + "type": "string" + }, + "useMetadataExchange": { + "description": "Optional. An optional hint to the endpoint to generate a client ceritificate that can be used by AlloyDB connectors to exchange additional metadata with the server after TLS handshake.", + "type": "boolean" + } + }, + "type": "object" + }, + "GenerateClientCertificateResponse": { + "description": "Message returned by a GenerateClientCertificate operation.", + "id": "GenerateClientCertificateResponse", + "properties": { + "caCert": { + "description": "Optional. The pem-encoded cluster ca X.509 certificate.", + "type": "string" + }, + "pemCertificate": { + "description": "Output only. The pem-encoded, signed X.509 certificate.", + "readOnly": true, + "type": "string" + }, + "pemCertificateChain": { + "description": "Output only. The pem-encoded chain that may be used to verify the X.509 certificate. Expected to be in issuer-to-root order according to RFC 5246.", + "items": { + "type": "string" + }, + "readOnly": true, + "type": "array" + } + }, + "type": "object" + }, + "GoogleCloudLocationListLocationsResponse": { + "description": "The response message for Locations.ListLocations.", + "id": "GoogleCloudLocationListLocationsResponse", + "properties": { + "locations": { + "description": "A list of locations that matches the specified filter in the request.", + "items": { + "$ref": "GoogleCloudLocationLocation" + }, + "type": "array" + }, + "nextPageToken": { + "description": "The standard List next-page token.", + "type": "string" + } + }, + "type": "object" + }, + "GoogleCloudLocationLocation": { + "description": "A resource that represents a Google Cloud location.", + "id": "GoogleCloudLocationLocation", + "properties": { + "displayName": { + "description": "The friendly name for this location, typically a nearby city name. For example, \"Tokyo\".", + "type": "string" + }, + "labels": { + "additionalProperties": { + "type": "string" + }, + "description": "Cross-service attributes for the location. For example {\"cloud.googleapis.com/region\": \"us-east1\"}", + "type": "object" + }, + "locationId": { + "description": "The canonical id for this location. For example: `\"us-east1\"`.", + "type": "string" + }, + "metadata": { + "additionalProperties": { + "description": "Properties of the object. Contains field @type with type URL.", + "type": "any" + }, + "description": "Service-specific metadata. For example the available capacity at the given location.", + "type": "object" + }, + "name": { + "description": "Resource name for the location, which may vary between implementations. For example: `\"projects/example-project/locations/us-east1\"`", + "type": "string" + } + }, + "type": "object" + }, + "GoogleTypeTimeOfDay": { + "description": "Represents a time of day. The date and time zone are either not significant or are specified elsewhere. An API may choose to allow leap seconds. Related types are google.type.Date and `google.protobuf.Timestamp`.", + "id": "GoogleTypeTimeOfDay", + "properties": { + "hours": { + "description": "Hours of day in 24 hour format. Should be from 0 to 23. An API may choose to allow the value \"24:00:00\" for scenarios like business closing time.", + "format": "int32", + "type": "integer" + }, + "minutes": { + "description": "Minutes of hour of day. Must be from 0 to 59.", + "format": "int32", + "type": "integer" + }, + "nanos": { + "description": "Fractions of seconds in nanoseconds. Must be from 0 to 999,999,999.", + "format": "int32", + "type": "integer" + }, + "seconds": { + "description": "Seconds of minutes of the time. Must normally be from 0 to 59. An API may allow the value 60 if it allows leap-seconds.", + "format": "int32", + "type": "integer" + } + }, + "type": "object" + }, + "InjectFaultRequest": { + "description": "Message for triggering fault injection on an instance", + "id": "InjectFaultRequest", + "properties": { + "faultType": { + "description": "Required. The type of fault to be injected in an instance.", + "enum": [ + "FAULT_TYPE_UNSPECIFIED", + "STOP_VM" + ], + "enumDescriptions": [ + "The fault type is unknown.", + "Stop the VM" + ], + "type": "string" + }, + "requestId": { + "description": "Optional. An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. The server will guarantee that for at least 60 minutes after the first request. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", + "type": "string" + }, + "validateOnly": { + "description": "Optional. If set, performs request validation (e.g. permission checks and any other type of validation), but do not actually execute the fault injection.", + "type": "boolean" + } + }, + "type": "object" + }, + "Instance": { + "description": "An Instance is a computing unit that an end customer can connect to. It's the main unit of computing resources in AlloyDB.", + "id": "Instance", + "properties": { + "annotations": { + "additionalProperties": { + "type": "string" + }, + "description": "Annotations to allow client tools to store small amount of arbitrary data. This is distinct from labels. https://google.aip.dev/128", + "type": "object" + }, + "availabilityType": { + "description": "Availability type of an Instance. If empty, defaults to REGIONAL for primary instances. For read pools, availability_type is always UNSPECIFIED. Instances in the read pools are evenly distributed across available zones within the region (i.e. read pools with more than one node will have a node in at least two zones).", + "enum": [ + "AVAILABILITY_TYPE_UNSPECIFIED", + "ZONAL", + "REGIONAL" + ], + "enumDescriptions": [ + "This is an unknown Availability type.", + "Zonal available instance.", + "Regional (or Highly) available instance." + ], + "type": "string" + }, + "clientConnectionConfig": { + "$ref": "ClientConnectionConfig", + "description": "Optional. Client connection specific configurations" + }, + "createTime": { + "description": "Output only. Create time stamp", + "format": "google-datetime", + "readOnly": true, + "type": "string" + }, + "databaseFlags": { + "additionalProperties": { + "type": "string" + }, + "description": "Database flags. Set at instance level. * They are copied from primary instance on read instance creation. * Read instances can set new or override existing flags that are relevant for reads, e.g. for enabling columnar cache on a read instance. Flags set on read instance may or may not be present on primary. This is a list of \"key\": \"value\" pairs. \"key\": The name of the flag. These flags are passed at instance setup time, so include both server options and system variables for Postgres. Flags are specified with underscores, not hyphens. \"value\": The value of the flag. Booleans are set to **on** for true and **off** for false. This field must be omitted if the flag doesn't take a value.", + "type": "object" + }, + "deleteTime": { + "description": "Output only. Delete time stamp", + "format": "google-datetime", + "readOnly": true, + "type": "string" + }, + "displayName": { + "description": "User-settable and human-readable display name for the Instance.", + "type": "string" + }, + "etag": { + "description": "For Resource freshness validation (https://google.aip.dev/154)", + "type": "string" + }, + "gceZone": { + "description": "The Compute Engine zone that the instance should serve from, per https://cloud.google.com/compute/docs/regions-zones This can ONLY be specified for ZONAL instances. If present for a REGIONAL instance, an error will be thrown. If this is absent for a ZONAL instance, instance is created in a random zone with available capacity.", + "type": "string" + }, + "instanceType": { + "description": "Required. The type of the instance. Specified at creation time.", + "enum": [ + "INSTANCE_TYPE_UNSPECIFIED", + "PRIMARY", + "READ_POOL", + "SECONDARY" + ], + "enumDescriptions": [ + "The type of the instance is unknown.", + "PRIMARY instances support read and write operations.", + "READ POOL instances support read operations only. Each read pool instance consists of one or more homogeneous nodes. * Read pool of size 1 can only have zonal availability. * Read pools with node count of 2 or more can have regional availability (nodes are present in 2 or more zones in a region).", + "SECONDARY instances support read operations only. SECONDARY instance is a cross-region read replica" + ], + "type": "string" + }, + "ipAddress": { + "description": "Output only. The IP address for the Instance. This is the connection endpoint for an end-user application.", + "readOnly": true, + "type": "string" + }, + "labels": { + "additionalProperties": { + "type": "string" + }, + "description": "Labels as key value pairs", + "type": "object" + }, + "machineConfig": { + "$ref": "MachineConfig", + "description": "Configurations for the machines that host the underlying database engine." + }, + "name": { + "description": "Output only. The name of the instance resource with the format: * projects/{project}/locations/{region}/clusters/{cluster_id}/instances/{instance_id} where the cluster and instance ID segments should satisfy the regex expression `[a-z]([a-z0-9-]{0,61}[a-z0-9])?`, e.g. 1-63 characters of lowercase letters, numbers, and dashes, starting with a letter, and ending with a letter or number. For more details see https://google.aip.dev/122. The prefix of the instance resource name is the name of the parent resource: * projects/{project}/locations/{region}/clusters/{cluster_id}", + "readOnly": true, + "type": "string" + }, + "nodes": { + "description": "Output only. List of available read-only VMs in this instance, including the standby for a PRIMARY instance.", + "items": { + "$ref": "Node" + }, + "readOnly": true, + "type": "array" + }, + "queryInsightsConfig": { + "$ref": "QueryInsightsInstanceConfig", + "description": "Configuration for query insights." + }, + "readPoolConfig": { + "$ref": "ReadPoolConfig", + "description": "Read pool specific config." + }, + "reconciling": { + "description": "Output only. Reconciling (https://google.aip.dev/128#reconciliation). Set to true if the current state of Instance does not match the user's intended state, and the service is actively updating the resource to reconcile them. This can happen due to user-triggered updates or system actions like failover or maintenance.", + "readOnly": true, + "type": "boolean" + }, + "satisfiesPzs": { + "description": "Reserved for future use.", + "type": "boolean" + }, + "state": { + "description": "Output only. The current serving state of the instance.", + "enum": [ + "STATE_UNSPECIFIED", + "READY", + "STOPPED", + "CREATING", + "DELETING", + "MAINTENANCE", + "FAILED", + "BOOTSTRAPPING", + "PROMOTING" + ], + "enumDescriptions": [ + "The state of the instance is unknown.", + "The instance is active and running.", + "The instance is stopped. Instance name and IP resources are preserved.", + "The instance is being created.", + "The instance is being deleted.", + "The instance is down for maintenance.", + "The creation of the instance failed or a fatal error occurred during an operation on the instance. Note: Instances in this state would tried to be auto-repaired. And Customers should be able to restart, update or delete these instances.", + "Index 7 is used in the producer apis for ROLLED_BACK state. Keeping that index unused in case that state also needs to exposed via consumer apis in future. The instance has been configured to sync data from some other source.", + "The instance is being promoted." + ], + "readOnly": true, + "type": "string" + }, + "uid": { + "description": "Output only. The system-generated UID of the resource. The UID is assigned when the resource is created, and it is retained until it is deleted.", + "readOnly": true, + "type": "string" + }, + "updatePolicy": { + "$ref": "UpdatePolicy", + "description": "Update policy that will be applied during instance update. This field is not persisted when you update the instance. To use a non-default update policy, you must specify explicitly specify the value in each update request." + }, + "updateTime": { + "description": "Output only. Update time stamp", + "format": "google-datetime", + "readOnly": true, + "type": "string" + }, + "writableNode": { + "$ref": "Node", + "description": "Output only. This is set for the read-write VM of the PRIMARY instance only.", + "readOnly": true + } + }, + "type": "object" + }, + "IntegerRestrictions": { + "description": "Restrictions on INTEGER type values.", + "id": "IntegerRestrictions", + "properties": { + "maxValue": { + "description": "The maximum value that can be specified, if applicable.", + "format": "int64", + "type": "string" + }, + "minValue": { + "description": "The minimum value that can be specified, if applicable.", + "format": "int64", + "type": "string" + } + }, + "type": "object" + }, + "ListBackupsResponse": { + "description": "Message for response to listing Backups", + "id": "ListBackupsResponse", + "properties": { + "backups": { + "description": "The list of Backup", + "items": { + "$ref": "Backup" + }, + "type": "array" + }, + "nextPageToken": { + "description": "A token identifying a page of results the server should return.", + "type": "string" + }, + "unreachable": { + "description": "Locations that could not be reached.", + "items": { + "type": "string" + }, + "type": "array" + } + }, + "type": "object" + }, + "ListClustersResponse": { + "description": "Message for response to listing Clusters", + "id": "ListClustersResponse", + "properties": { + "clusters": { + "description": "The list of Cluster", + "items": { + "$ref": "Cluster" + }, + "type": "array" + }, + "nextPageToken": { + "description": "A token identifying a page of results the server should return.", + "type": "string" + }, + "unreachable": { + "description": "Locations that could not be reached.", + "items": { + "type": "string" + }, + "type": "array" + } + }, + "type": "object" + }, + "ListInstancesResponse": { + "description": "Message for response to listing Instances", + "id": "ListInstancesResponse", + "properties": { + "instances": { + "description": "The list of Instance", + "items": { + "$ref": "Instance" + }, + "type": "array" + }, + "nextPageToken": { + "description": "A token identifying a page of results the server should return.", + "type": "string" + }, + "unreachable": { + "description": "Locations that could not be reached.", + "items": { + "type": "string" + }, + "type": "array" + } + }, + "type": "object" + }, + "ListOperationsResponse": { + "description": "The response message for Operations.ListOperations.", + "id": "ListOperationsResponse", + "properties": { + "nextPageToken": { + "description": "The standard List next-page token.", + "type": "string" + }, + "operations": { + "description": "A list of operations that matches the specified filter in the request.", + "items": { + "$ref": "Operation" + }, + "type": "array" + } + }, + "type": "object" + }, + "ListSupportedDatabaseFlagsResponse": { + "description": "Message for response to listing SupportedDatabaseFlags.", + "id": "ListSupportedDatabaseFlagsResponse", + "properties": { + "nextPageToken": { + "description": "A token identifying a page of results the server should return.", + "type": "string" + }, + "supportedDatabaseFlags": { + "description": "The list of SupportedDatabaseFlags.", + "items": { + "$ref": "SupportedDatabaseFlag" + }, + "type": "array" + } + }, + "type": "object" + }, + "ListUsersResponse": { + "description": "Message for response to listing Users", + "id": "ListUsersResponse", + "properties": { + "nextPageToken": { + "description": "A token identifying a page of results the server should return.", + "type": "string" + }, + "unreachable": { + "description": "Locations that could not be reached.", + "items": { + "type": "string" + }, + "type": "array" + }, + "users": { + "description": "The list of User", + "items": { + "$ref": "User" + }, + "type": "array" + } + }, + "type": "object" + }, + "MachineConfig": { + "description": "MachineConfig describes the configuration of a machine.", + "id": "MachineConfig", + "properties": { + "cpuCount": { + "description": "The number of CPU's in the VM instance.", + "format": "int32", + "type": "integer" + } + }, + "type": "object" + }, + "MigrationSource": { + "description": "Subset of the source instance configuration that is available when reading the cluster resource.", + "id": "MigrationSource", + "properties": { + "hostPort": { + "description": "Output only. The host and port of the on-premises instance in host:port format", + "readOnly": true, + "type": "string" + }, + "referenceId": { + "description": "Output only. Place holder for the external source identifier(e.g DMS job name) that created the cluster.", + "readOnly": true, + "type": "string" + }, + "sourceType": { + "description": "Output only. Type of migration source.", + "enum": [ + "MIGRATION_SOURCE_TYPE_UNSPECIFIED", + "DMS" + ], + "enumDescriptions": [ + "Migration source is unknown.", + "DMS source means the cluster was created via DMS migration job." + ], + "readOnly": true, + "type": "string" + } + }, + "type": "object" + }, + "NetworkConfig": { + "description": "Metadata related to network configuration.", + "id": "NetworkConfig", + "properties": { + "allocatedIpRange": { + "description": "Optional. Name of the allocated IP range for the private IP AlloyDB cluster, for example: \"google-managed-services-default\". If set, the instance IPs for this cluster will be created in the allocated range. The range name must comply with RFC 1035. Specifically, the name must be 1-63 characters long and match the regular expression [a-z]([-a-z0-9]*[a-z0-9])?. Field name is intended to be consistent with CloudSQL.", + "type": "string" + }, + "network": { + "description": "Required. The resource link for the VPC network in which cluster resources are created and from which they are accessible via Private IP. The network must belong to the same project as the cluster. It is specified in the form: \"projects/{project_number}/global/networks/{network_id}\". This is required to create a cluster. It can be updated, but it cannot be removed.", + "type": "string" + } + }, + "type": "object" + }, + "Node": { + "description": "Details of a single node in the instance. Nodes in an AlloyDB instance are ephemereal, they can change during update, failover, autohealing and resize operations.", + "id": "Node", + "properties": { + "id": { + "description": "The identifier of the VM e.g. \"test-read-0601-407e52be-ms3l\".", + "type": "string" + }, + "ip": { + "description": "The private IP address of the VM e.g. \"10.57.0.34\".", + "type": "string" + }, + "state": { + "description": "Determined by state of the compute VM and postgres-service health. Compute VM state can have values listed in https://cloud.google.com/compute/docs/instances/instance-life-cycle and postgres-service health can have values: HEALTHY and UNHEALTHY.", + "type": "string" + }, + "zoneId": { + "description": "The Compute Engine zone of the VM e.g. \"us-central1-b\".", + "type": "string" + } + }, + "type": "object" + }, + "Operation": { + "description": "This resource represents a long-running operation that is the result of a network API call.", + "id": "Operation", + "properties": { + "done": { + "description": "If the value is `false`, it means the operation is still in progress. If `true`, the operation is completed, and either `error` or `response` is available.", + "type": "boolean" + }, + "error": { + "$ref": "Status", + "description": "The error result of the operation in case of failure or cancellation." + }, + "metadata": { + "additionalProperties": { + "description": "Properties of the object. Contains field @type with type URL.", + "type": "any" + }, + "description": "Service-specific metadata associated with the operation. It typically contains progress information and common metadata such as create time. Some services might not provide such metadata. Any method that returns a long-running operation should document the metadata type, if any.", + "type": "object" + }, + "name": { + "description": "The server-assigned name, which is only unique within the same service that originally returns it. If you use the default HTTP mapping, the `name` should be a resource name ending with `operations/{unique_id}`.", + "type": "string" + }, + "response": { + "additionalProperties": { + "description": "Properties of the object. Contains field @type with type URL.", + "type": "any" + }, + "description": "The normal, successful response of the operation. If the original method returns no data on success, such as `Delete`, the response is `google.protobuf.Empty`. If the original method is standard `Get`/`Create`/`Update`, the response should be the resource. For other methods, the response should have the type `XxxResponse`, where `Xxx` is the original method name. For example, if the original method name is `TakeSnapshot()`, the inferred response type is `TakeSnapshotResponse`.", + "type": "object" + } + }, + "type": "object" + }, + "OperationMetadata": { + "description": "Represents the metadata of the long-running operation.", + "id": "OperationMetadata", + "properties": { + "apiVersion": { + "description": "Output only. API version used to start the operation.", + "readOnly": true, + "type": "string" + }, + "createTime": { + "description": "Output only. The time the operation was created.", + "format": "google-datetime", + "readOnly": true, + "type": "string" + }, + "endTime": { + "description": "Output only. The time the operation finished running.", + "format": "google-datetime", + "readOnly": true, + "type": "string" + }, + "requestedCancellation": { + "description": "Output only. Identifies whether the user has requested cancellation of the operation. Operations that have successfully been cancelled have Operation.error value with a google.rpc.Status.code of 1, corresponding to `Code.CANCELLED`.", + "readOnly": true, + "type": "boolean" + }, + "statusMessage": { + "description": "Output only. Human-readable status of the operation, if any.", + "readOnly": true, + "type": "string" + }, + "target": { + "description": "Output only. Server-defined resource path for the target of the operation.", + "readOnly": true, + "type": "string" + }, + "verb": { + "description": "Output only. Name of the verb executed by the operation.", + "readOnly": true, + "type": "string" + } + }, + "type": "object" + }, + "PrimaryConfig": { + "description": "Configuration for the primary cluster. It has the list of clusters that are replicating from this cluster. This should be set if and only if the cluster is of type PRIMARY.", + "id": "PrimaryConfig", + "properties": { + "secondaryClusterNames": { + "description": "Output only. Names of the clusters that are replicating from this cluster.", + "items": { + "type": "string" + }, + "readOnly": true, + "type": "array" + } + }, + "type": "object" + }, + "PromoteClusterRequest": { + "description": "Message for promoting a Cluster", + "id": "PromoteClusterRequest", + "properties": { + "etag": { + "description": "Optional. The current etag of the Cluster. If an etag is provided and does not match the current etag of the Cluster, deletion will be blocked and an ABORTED error will be returned.", + "type": "string" + }, + "requestId": { + "description": "Optional. An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. The server will guarantee that for at least 60 minutes after the first request. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", + "type": "string" + }, + "validateOnly": { + "description": "Optional. If set, performs request validation (e.g. permission checks and any other type of validation), but do not actually execute the delete.", + "type": "boolean" + } + }, + "type": "object" + }, + "QuantityBasedExpiry": { + "description": "A backup's position in a quantity-based retention queue, of backups with the same source cluster and type, with length, retention, specified by the backup's retention policy. Once the position is greater than the retention, the backup is eligible to be garbage collected. Example: 5 backups from the same source cluster and type with a quantity-based retention of 3 and denoted by backup_id (position, retention). Safe: backup_5 (1, 3), backup_4, (2, 3), backup_3 (3, 3). Awaiting garbage collection: backup_2 (4, 3), backup_1 (5, 3)", + "id": "QuantityBasedExpiry", + "properties": { + "retentionCount": { + "description": "Output only. The backup's position among its backups with the same source cluster and type, by descending chronological order create time(i.e. newest first).", + "format": "int32", + "readOnly": true, + "type": "integer" + }, + "totalRetentionCount": { + "description": "Output only. The length of the quantity-based queue, specified by the backup's retention policy.", + "format": "int32", + "readOnly": true, + "type": "integer" + } + }, + "type": "object" + }, + "QuantityBasedRetention": { + "description": "A quantity based policy specifies that a certain number of the most recent successful backups should be retained.", + "id": "QuantityBasedRetention", + "properties": { + "count": { + "description": "The number of backups to retain.", + "format": "int32", + "type": "integer" + } + }, + "type": "object" + }, + "QueryInsightsInstanceConfig": { + "description": "QueryInsights Instance specific configuration.", + "id": "QueryInsightsInstanceConfig", + "properties": { + "queryPlansPerMinute": { + "description": "Number of query execution plans captured by Insights per minute for all queries combined. The default value is 5. Any integer between 0 and 20 is considered valid.", + "format": "uint32", + "type": "integer" + }, + "queryStringLength": { + "description": "Query string length. The default value is 1024. Any integer between 256 and 4500 is considered valid.", + "format": "uint32", + "type": "integer" + }, + "recordApplicationTags": { + "description": "Record application tags for an instance. This flag is turned \"on\" by default.", + "type": "boolean" + }, + "recordClientAddress": { + "description": "Record client address for an instance. Client address is PII information. This flag is turned \"on\" by default.", + "type": "boolean" + } + }, + "type": "object" + }, + "ReadPoolConfig": { + "description": "Configuration for a read pool instance.", + "id": "ReadPoolConfig", + "properties": { + "nodeCount": { + "description": "Read capacity, i.e. number of nodes in a read pool instance.", + "format": "int32", + "type": "integer" + } + }, + "type": "object" + }, + "RestartInstanceRequest": { + "id": "RestartInstanceRequest", + "properties": { + "requestId": { + "description": "Optional. An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. The server will guarantee that for at least 60 minutes after the first request. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", + "type": "string" + }, + "validateOnly": { + "description": "Optional. If set, performs request validation (e.g. permission checks and any other type of validation), but do not actually execute the restart.", + "type": "boolean" + } + }, + "type": "object" + }, + "RestoreClusterRequest": { + "description": "Message for restoring a Cluster from a backup or another cluster at a given point in time.", + "id": "RestoreClusterRequest", + "properties": { + "backupSource": { + "$ref": "BackupSource", + "description": "Backup source." + }, + "cluster": { + "$ref": "Cluster", + "description": "Required. The resource being created" + }, + "clusterId": { + "description": "Required. ID of the requesting object.", + "type": "string" + }, + "continuousBackupSource": { + "$ref": "ContinuousBackupSource", + "description": "ContinuousBackup source. Continuous backup needs to be enabled in the source cluster for this operation to succeed." + }, + "requestId": { + "description": "Optional. An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. The server will guarantee that for at least 60 minutes since the first request. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", + "type": "string" + }, + "validateOnly": { + "description": "Optional. If set, performs request validation (e.g. permission checks and any other type of validation), but do not actually execute the import request.", + "type": "boolean" + } + }, + "type": "object" + }, + "SecondaryConfig": { + "description": "Configuration information for the secondary cluster. This should be set if and only if the cluster is of type SECONDARY.", + "id": "SecondaryConfig", + "properties": { + "primaryClusterName": { + "description": "The name of the primary cluster name with the format: * projects/{project}/locations/{region}/clusters/{cluster_id}", + "type": "string" + } + }, + "type": "object" + }, + "SslConfig": { + "description": "SSL configuration.", + "id": "SslConfig", + "properties": { + "caSource": { + "description": "Optional. Certificate Authority (CA) source. Only CA_SOURCE_MANAGED is supported currently, and is the default value.", + "enum": [ + "CA_SOURCE_UNSPECIFIED", + "CA_SOURCE_MANAGED" + ], + "enumDescriptions": [ + "Certificate Authority (CA) source not specified. Defaults to CA_SOURCE_MANAGED.", + "Certificate Authority (CA) managed by the AlloyDB Cluster." + ], + "type": "string" + }, + "sslMode": { + "description": "Optional. SSL mode. Specifies client-server SSL/TLS connection behavior.", + "enum": [ + "SSL_MODE_UNSPECIFIED", + "SSL_MODE_ALLOW", + "SSL_MODE_REQUIRE", + "SSL_MODE_VERIFY_CA", + "ALLOW_UNENCRYPTED_AND_ENCRYPTED", + "ENCRYPTED_ONLY" + ], + "enumDeprecated": [ + false, + true, + true, + true, + false, + false + ], + "enumDescriptions": [ + "SSL mode not specified. Defaults to ENCRYPTED_ONLY.", + "SSL connections are optional. CA verification not enforced.", + "SSL connections are required. CA verification not enforced. Clients may use locally self-signed certificates (default psql client behavior).", + "SSL connections are required. CA verification enforced. Clients must have certificates signed by a Cluster CA, e.g. via GenerateClientCertificate.", + "SSL connections are optional. CA verification not enforced.", + "SSL connections are required. CA verification not enforced." + ], + "type": "string" + } + }, + "type": "object" + }, + "Status": { + "description": "The `Status` type defines a logical error model that is suitable for different programming environments, including REST APIs and RPC APIs. It is used by [gRPC](https://github.com/grpc). Each `Status` message contains three pieces of data: error code, error message, and error details. You can find out more about this error model and how to work with it in the [API Design Guide](https://cloud.google.com/apis/design/errors).", + "id": "Status", + "properties": { + "code": { + "description": "The status code, which should be an enum value of google.rpc.Code.", + "format": "int32", + "type": "integer" + }, + "details": { + "description": "A list of messages that carry the error details. There is a common set of message types for APIs to use.", + "items": { + "additionalProperties": { + "description": "Properties of the object. Contains field @type with type URL.", + "type": "any" + }, + "type": "object" + }, + "type": "array" + }, + "message": { + "description": "A developer-facing error message, which should be in English. Any user-facing error message should be localized and sent in the google.rpc.Status.details field, or localized by the client.", + "type": "string" + } + }, + "type": "object" + }, + "StorageDatabasecenterPartnerapiV1mainAvailabilityConfiguration": { + "description": "Configuration for availability of database instance", + "id": "StorageDatabasecenterPartnerapiV1mainAvailabilityConfiguration", + "properties": { + "availabilityType": { + "description": "Availability type. Potential values: * `ZONAL`: The instance serves data from only one zone. Outages in that zone affect data accessibility. * `REGIONAL`: The instance can serve data from more than one zone in a region (it is highly available).", + "enum": [ + "AVAILABILITY_TYPE_UNSPECIFIED", + "ZONAL", + "REGIONAL", + "MULTI_REGIONAL", + "AVAILABILITY_TYPE_OTHER" + ], + "enumDescriptions": [ + "", + "Zonal available instance.", + "Regional available instance.", + "Multi regional instance", + "For rest of the other category" + ], + "type": "string" + }, + "externalReplicaConfigured": { + "type": "boolean" + }, + "promotableReplicaConfigured": { + "type": "boolean" + } + }, + "type": "object" + }, + "StorageDatabasecenterPartnerapiV1mainBackupConfiguration": { + "description": "Configuration for automatic backups", + "id": "StorageDatabasecenterPartnerapiV1mainBackupConfiguration", + "properties": { + "automatedBackupEnabled": { + "description": "Whether customer visible automated backups are enabled on the instance.", + "type": "boolean" + }, + "backupRetentionSettings": { + "$ref": "StorageDatabasecenterPartnerapiV1mainRetentionSettings", + "description": "Backup retention settings." + } + }, + "type": "object" + }, + "StorageDatabasecenterPartnerapiV1mainBackupRun": { + "description": "A backup run.", + "id": "StorageDatabasecenterPartnerapiV1mainBackupRun", + "properties": { + "endTime": { + "description": "The time the backup operation completed. REQUIRED", + "format": "google-datetime", + "type": "string" + }, + "error": { + "$ref": "StorageDatabasecenterPartnerapiV1mainOperationError", + "description": "Information about why the backup operation failed. This is only present if the run has the FAILED status. OPTIONAL" + }, + "startTime": { + "description": "The time the backup operation started. REQUIRED", + "format": "google-datetime", + "type": "string" + }, + "status": { + "description": "The status of this run. REQUIRED", + "enum": [ + "STATUS_UNSPECIFIED", + "SUCCESSFUL", + "FAILED" + ], + "enumDescriptions": [ + "", + "The backup was successful.", + "The backup was unsuccessful." + ], + "type": "string" + } + }, + "type": "object" + }, + "StorageDatabasecenterPartnerapiV1mainDatabaseResourceFeed": { + "description": "DatabaseResourceFeed is the top level proto to be used to ingest different database resource level events into Condor platform.", + "id": "StorageDatabasecenterPartnerapiV1mainDatabaseResourceFeed", + "properties": { + "feedTimestamp": { + "description": "Required. Timestamp when feed is generated.", + "format": "google-datetime", + "type": "string" + }, + "feedType": { + "description": "Required. Type feed to be ingested into condor", + "enum": [ + "FEEDTYPE_UNSPECIFIED", + "RESOURCE_METADATA", + "OBSERVABILITY_DATA", + "COMPLIANCE_DATA" + ], + "enumDescriptions": [ + "", + "Database resource metadata feed from control plane", + "Database resource monitoring data", + "Database resource compliance feed" + ], + "type": "string" + }, + "resourceId": { + "$ref": "StorageDatabasecenterPartnerapiV1mainDatabaseResourceId", + "description": "Required. Primary key associated with the Resource" + }, + "resourceMetadata": { + "$ref": "StorageDatabasecenterPartnerapiV1mainDatabaseResourceMetadata", + "description": "More feed data would be added in subsequent CLs" + } + }, + "type": "object" + }, + "StorageDatabasecenterPartnerapiV1mainDatabaseResourceId": { + "description": "DatabaseResourceId will serve as primary key for any resource ingestion event.", + "id": "StorageDatabasecenterPartnerapiV1mainDatabaseResourceId", + "properties": { + "provider": { + "description": "Required. Cloud provider name. Ex: GCP/AWS/Azure/OnPrem/SelfManaged", + "enum": [ + "PROVIDER_UNSPECIFIED", + "GCP", + "AWS", + "AZURE", + "ONPREM", + "SELFMANAGED", + "PROVIDER_OTHER" + ], + "enumDescriptions": [ + "", + "Google cloud platform provider", + "Amazon web service", + "Azure web service", + "On-prem database provider", + "Self-managed database provider", + "For rest of the other category" + ], + "type": "string" + }, + "resourceType": { + "description": "Required. The type of resource this ID is identifying. Ex google.sqladmin.Instance, google.alloydb.cluster, google.sqladmin.Backup REQUIRED", + "type": "string" + }, + "uniqueId": { + "description": "Required. A service-local token that distinguishes this resource from other resources within the same service.", + "type": "string" + } + }, + "type": "object" + }, + "StorageDatabasecenterPartnerapiV1mainDatabaseResourceMetadata": { + "description": "Common model for database resource instance metadata.", + "id": "StorageDatabasecenterPartnerapiV1mainDatabaseResourceMetadata", + "properties": { + "availabilityConfiguration": { + "$ref": "StorageDatabasecenterPartnerapiV1mainAvailabilityConfiguration", + "description": "Availability configuration for this instance" + }, + "backupConfiguration": { + "$ref": "StorageDatabasecenterPartnerapiV1mainBackupConfiguration", + "description": "Backup configuration for this instance" + }, + "backupRun": { + "$ref": "StorageDatabasecenterPartnerapiV1mainBackupRun", + "description": "Latest backup run information for this instance" + }, + "creationTime": { + "description": "The creation time of the resource, i.e. the time when resource is created and recorded in partner service.", + "format": "google-datetime", + "type": "string" + }, + "currentState": { + "description": "Current state of the instance.", + "enum": [ + "STATE_UNSPECIFIED", + "HEALTHY", + "UNHEALTHY", + "STATE_OTHER" + ], + "enumDescriptions": [ + "", + "The instance is running.", + "Instance being created, updated, deleted or under maintenance", + "For rest of the other category" + ], + "type": "string" + }, + "expectedState": { + "description": "The actual instance state.", + "enum": [ + "STATE_UNSPECIFIED", + "HEALTHY", + "UNHEALTHY", + "STATE_OTHER" + ], + "enumDescriptions": [ + "", + "The instance is running.", + "Instance being created, updated, deleted or under maintenance", + "For rest of the other category" + ], + "type": "string" + }, + "id": { + "$ref": "StorageDatabasecenterPartnerapiV1mainDatabaseResourceId", + "description": "Required. Unique identifier for a Database resource" + }, + "instanceType": { + "description": "The type of the instance. Specified at creation time.", + "enum": [ + "INSTANCE_TYPE_UNSPECIFIED", + "PRIMARY", + "READ_REPLICA", + "OTHER" + ], + "enumDescriptions": [ + "", + "A regular primary database instance.", + "An instance acting as a read-replica.", + "For rest of the other categories." + ], + "type": "string" + }, + "location": { + "description": "The resource location. REQUIRED", + "type": "string" + }, + "primaryResourceId": { + "$ref": "StorageDatabasecenterPartnerapiV1mainDatabaseResourceId", + "description": "Unique identifier for this resource's immediate parent resource. This parent resource id would be used to build resource hierarchy in condor platform." + }, + "product": { + "$ref": "StorageDatabasecenterProtoCommonProduct", + "description": "The product this resource represents." + }, + "resourceContainer": { + "description": "Closest parent Cloud Resource Manager container of this resource. It must either be resource name of a Cloud Resource Manager project, for ex: \"projects/123\".", + "type": "string" + }, + "resourceName": { + "description": "Required. Different from unique_id, a resource name can be reused over time. That is after a resource named \"ABC\" is deleted, the name \"ABC\" can be used to to create a new resource within the same source.", + "type": "string" + }, + "updationTime": { + "description": "The time at which the resource was updated and recorded at partner service.", + "format": "google-datetime", + "type": "string" + }, + "userLabels": { + "additionalProperties": { + "type": "string" + }, + "description": "User-provided labels, represented as a dictionary where each label is a single key value pair.", + "type": "object" + } + }, + "type": "object" + }, + "StorageDatabasecenterPartnerapiV1mainOperationError": { + "description": "An error that occurred during a backup creation operation.", + "id": "StorageDatabasecenterPartnerapiV1mainOperationError", + "properties": { + "code": { + "description": "Identifies the specific error that occurred. REQUIRED", + "type": "string" + }, + "message": { + "description": "Additional information about the error encountered. REQUIRED", + "type": "string" + } + }, + "type": "object" + }, + "StorageDatabasecenterPartnerapiV1mainRetentionSettings": { + "id": "StorageDatabasecenterPartnerapiV1mainRetentionSettings", + "properties": { + "quantityBasedRetention": { + "format": "int32", + "type": "integer" + }, + "retentionUnit": { + "description": "The unit that 'retained_backups' represents.", + "enum": [ + "RETENTION_UNIT_UNSPECIFIED", + "COUNT", + "TIME", + "RETENTION_UNIT_OTHER" + ], + "enumDescriptions": [ + "Backup retention unit is unspecified, will be treated as COUNT.", + "Retention will be by count, eg. \"retain the most recent 7 backups\".", + "Retention will be by Time, eg. \"retain the last 7 days backups\".", + "For rest of the other category" + ], + "type": "string" + }, + "timeBasedRetention": { + "format": "google-duration", + "type": "string" + } + }, + "type": "object" + }, + "StorageDatabasecenterProtoCommonProduct": { + "description": "Product specification for Condor resources.", + "id": "StorageDatabasecenterProtoCommonProduct", + "properties": { + "engine": { + "description": "The specific engine that the underlying database is running.", + "enum": [ + "ENGINE_UNSPECIFIED", + "MYSQL", + "POSTGRES", + "SQL_SERVER", + "NATIVE", + "SPANGRES", + "ENGINE_OTHER" + ], + "enumDescriptions": [ + "UNSPECIFIED means engine type is not known or available.", + "MySQL binary running as engine in database instance.", + "Postgres binary running as engine in database instance.", + "SQLServer binary running as engine in database instance.", + "Native database binary running as engine in instance.", + "Cloud Spanner with Postgres dialect.", + "Other refers to rest of other database engine. This is to be when engine is known, but it is not present in this enum." + ], + "type": "string" + }, + "type": { + "description": "Type of specific database product. It could be CloudSQL, AlloyDB etc..", + "enum": [ + "PRODUCT_TYPE_UNSPECIFIED", + "CLOUD_SQL", + "ALLOYDB", + "SPANNER", + "ON_PREM", + "PRODUCT_TYPE_OTHER" + ], + "enumDescriptions": [ + "UNSPECIFIED means product type is not known or available.", + "Cloud SQL product area in GCP", + "AlloyDB product area in GCP", + "Spanner product area in GCP", + "On premises database product.", + "Other refers to rest of other product type. This is to be when product type is known, but it is not present in this enum." + ], + "type": "string" + }, + "version": { + "description": "Version of the underlying database engine. Example values: For MySQL, it could be \"8.0\", \"5.7\" etc.. For Postgres, it could be \"14\", \"15\" etc..", + "type": "string" + } + }, + "type": "object" + }, + "StringRestrictions": { + "description": "Restrictions on STRING type values", + "id": "StringRestrictions", + "properties": { + "allowedValues": { + "description": "The list of allowed values, if bounded. This field will be empty if there is a unbounded number of allowed values.", + "items": { + "type": "string" + }, + "type": "array" + } + }, + "type": "object" + }, + "SupportedDatabaseFlag": { + "description": "SupportedDatabaseFlag gives general information about a database flag, like type and allowed values. This is a static value that is defined on the server side, and it cannot be modified by callers. To set the Database flags on a particular Instance, a caller should modify the Instance.database_flags field.", + "id": "SupportedDatabaseFlag", + "properties": { + "acceptsMultipleValues": { + "description": "Whether the database flag accepts multiple values. If true, a comma-separated list of stringified values may be specified.", + "type": "boolean" + }, + "flagName": { + "description": "The name of the database flag, e.g. \"max_allowed_packets\". The is a possibly key for the Instance.database_flags map field.", + "type": "string" + }, + "integerRestrictions": { + "$ref": "IntegerRestrictions", + "description": "Restriction on INTEGER type value." + }, + "name": { + "description": "The name of the flag resource, following Google Cloud conventions, e.g.: * projects/{project}/locations/{location}/flags/{flag} This field currently has no semantic meaning.", + "type": "string" + }, + "requiresDbRestart": { + "description": "Whether setting or updating this flag on an Instance requires a database restart. If a flag that requires database restart is set, the backend will automatically restart the database (making sure to satisfy any availability SLO's).", + "type": "boolean" + }, + "stringRestrictions": { + "$ref": "StringRestrictions", + "description": "Restriction on STRING type value." + }, + "supportedDbVersions": { + "description": "Major database engine versions for which this flag is supported.", + "items": { + "enum": [ + "DATABASE_VERSION_UNSPECIFIED", + "POSTGRES_13", + "POSTGRES_14", + "POSTGRES_15" + ], + "enumDeprecated": [ + false, + true, + false, + false + ], + "enumDescriptions": [ + "This is an unknown database version.", + "DEPRECATED - The database version is Postgres 13.", + "The database version is Postgres 14.", + "The database version is Postgres 15." + ], + "type": "string" + }, + "type": "array" + }, + "valueType": { + "enum": [ + "VALUE_TYPE_UNSPECIFIED", + "STRING", + "INTEGER", + "FLOAT", + "NONE" + ], + "enumDescriptions": [ + "This is an unknown flag type.", + "String type flag.", + "Integer type flag.", + "Float type flag.", + "Denotes that the flag does not accept any values." + ], + "type": "string" + } + }, + "type": "object" + }, + "TimeBasedRetention": { + "description": "A time based retention policy specifies that all backups within a certain time period should be retained.", + "id": "TimeBasedRetention", + "properties": { + "retentionPeriod": { + "description": "The retention period.", + "format": "google-duration", + "type": "string" + } + }, + "type": "object" + }, + "UpdatePolicy": { + "description": "Policy to be used while updating the instance.", + "id": "UpdatePolicy", + "properties": { + "mode": { + "description": "Mode for updating the instance.", + "enum": [ + "MODE_UNSPECIFIED", + "DEFAULT", + "FORCE_APPLY" + ], + "enumDescriptions": [ + "Mode is unknown.", + "Least disruptive way to apply the update.", + "Performs a forced update when applicable. This will be fast but may incur a downtime." + ], + "type": "string" + } + }, + "type": "object" + }, + "User": { + "description": "Message describing User object.", + "id": "User", + "properties": { + "databaseRoles": { + "description": "Optional. List of database roles this user has. The database role strings are subject to the PostgreSQL naming conventions.", + "items": { + "type": "string" + }, + "type": "array" + }, + "name": { + "description": "Output only. Name of the resource in the form of projects/{project}/locations/{location}/cluster/{cluster}/users/{user}.", + "readOnly": true, + "type": "string" + }, + "password": { + "description": "Input only. Password for the user.", + "type": "string" + }, + "userType": { + "description": "Optional. Type of this user.", + "enum": [ + "USER_TYPE_UNSPECIFIED", + "ALLOYDB_BUILT_IN", + "ALLOYDB_IAM_USER" + ], + "enumDescriptions": [ + "Unspecified user type.", + "The default user type that authenticates via password-based authentication.", + "Database user that can authenticate via IAM-Based authentication." + ], + "type": "string" + } + }, + "type": "object" + }, + "UserPassword": { + "description": "The username/password for a database user. Used for specifying initial users at cluster creation time.", + "id": "UserPassword", + "properties": { + "password": { + "description": "The initial password for the user.", + "type": "string" + }, + "user": { + "description": "The database username.", + "type": "string" + } + }, + "type": "object" + }, + "WeeklySchedule": { + "description": "A weekly schedule starts a backup at prescribed start times within a day, for the specified days of the week. The weekly schedule message is flexible and can be used to create many types of schedules. For example, to have a daily backup that starts at 22:00, configure the `start_times` field to have one element \"22:00\" and the `days_of_week` field to have all seven days of the week.", + "id": "WeeklySchedule", + "properties": { + "daysOfWeek": { + "description": "The days of the week to perform a backup. If this field is left empty, the default of every day of the week is used.", + "items": { + "enum": [ + "DAY_OF_WEEK_UNSPECIFIED", + "MONDAY", + "TUESDAY", + "WEDNESDAY", + "THURSDAY", + "FRIDAY", + "SATURDAY", + "SUNDAY" + ], + "enumDescriptions": [ + "The day of the week is unspecified.", + "Monday", + "Tuesday", + "Wednesday", + "Thursday", + "Friday", + "Saturday", + "Sunday" + ], + "type": "string" + }, + "type": "array" + }, + "startTimes": { + "description": "The times during the day to start a backup. The start times are assumed to be in UTC and to be an exact hour (e.g., 04:00:00). If no start times are provided, a single fixed start time is chosen arbitrarily.", + "items": { + "$ref": "GoogleTypeTimeOfDay" + }, + "type": "array" + } + }, + "type": "object" + } + }, + "servicePath": "", + "title": "AlloyDB API", + "version": "v1alpha", + "version_module": true +} \ No newline at end of file diff --git a/alloydb/v1alpha/alloydb-gen.go b/alloydb/v1alpha/alloydb-gen.go new file mode 100644 index 00000000000..b5420305a62 --- /dev/null +++ b/alloydb/v1alpha/alloydb-gen.go @@ -0,0 +1,9790 @@ +// Copyright 2023 Google LLC. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +// Code generated file. DO NOT EDIT. + +// Package alloydb provides access to the AlloyDB API. +// +// For product documentation, see: https://cloud.google.com/alloydb/ +// +// # Library status +// +// These client libraries are officially supported by Google. However, this +// library is considered complete and is in maintenance mode. This means +// that we will address critical bugs and security issues but will not add +// any new features. +// +// When possible, we recommend using our newer +// [Cloud Client Libraries for Go](https://pkg.go.dev/cloud.google.com/go) +// that are still actively being worked and iterated on. +// +// # Creating a client +// +// Usage example: +// +// import "google.golang.org/api/alloydb/v1alpha" +// ... +// ctx := context.Background() +// alloydbService, err := alloydb.NewService(ctx) +// +// In this example, Google Application Default Credentials are used for +// authentication. For information on how to create and obtain Application +// Default Credentials, see https://developers.google.com/identity/protocols/application-default-credentials. +// +// # Other authentication options +// +// To use an API key for authentication (note: some APIs do not support API +// keys), use [google.golang.org/api/option.WithAPIKey]: +// +// alloydbService, err := alloydb.NewService(ctx, option.WithAPIKey("AIza...")) +// +// To use an OAuth token (e.g., a user token obtained via a three-legged OAuth +// flow, use [google.golang.org/api/option.WithTokenSource]: +// +// config := &oauth2.Config{...} +// // ... +// token, err := config.Exchange(ctx, ...) +// alloydbService, err := alloydb.NewService(ctx, option.WithTokenSource(config.TokenSource(ctx, token))) +// +// See [google.golang.org/api/option.ClientOption] for details on options. +package alloydb // import "google.golang.org/api/alloydb/v1alpha" + +import ( + "bytes" + "context" + "encoding/json" + "errors" + "fmt" + "io" + "net/http" + "net/url" + "strconv" + "strings" + + googleapi "google.golang.org/api/googleapi" + internal "google.golang.org/api/internal" + gensupport "google.golang.org/api/internal/gensupport" + option "google.golang.org/api/option" + internaloption "google.golang.org/api/option/internaloption" + htransport "google.golang.org/api/transport/http" +) + +// Always reference these packages, just in case the auto-generated code +// below doesn't. +var _ = bytes.NewBuffer +var _ = strconv.Itoa +var _ = fmt.Sprintf +var _ = json.NewDecoder +var _ = io.Copy +var _ = url.Parse +var _ = gensupport.MarshalJSON +var _ = googleapi.Version +var _ = errors.New +var _ = strings.Replace +var _ = context.Canceled +var _ = internaloption.WithDefaultEndpoint +var _ = internal.Version + +const apiId = "alloydb:v1alpha" +const apiName = "alloydb" +const apiVersion = "v1alpha" +const basePath = "https://alloydb.googleapis.com/" +const mtlsBasePath = "https://alloydb.mtls.googleapis.com/" + +// OAuth2 scopes used by this API. +const ( + // See, edit, configure, and delete your Google Cloud data and see the + // email address for your Google Account. + CloudPlatformScope = "https://www.googleapis.com/auth/cloud-platform" +) + +// NewService creates a new Service. +func NewService(ctx context.Context, opts ...option.ClientOption) (*Service, error) { + scopesOption := internaloption.WithDefaultScopes( + "https://www.googleapis.com/auth/cloud-platform", + ) + // NOTE: prepend, so we don't override user-specified scopes. + opts = append([]option.ClientOption{scopesOption}, opts...) + opts = append(opts, internaloption.WithDefaultEndpoint(basePath)) + opts = append(opts, internaloption.WithDefaultMTLSEndpoint(mtlsBasePath)) + client, endpoint, err := htransport.NewClient(ctx, opts...) + if err != nil { + return nil, err + } + s, err := New(client) + if err != nil { + return nil, err + } + if endpoint != "" { + s.BasePath = endpoint + } + return s, nil +} + +// New creates a new Service. It uses the provided http.Client for requests. +// +// Deprecated: please use NewService instead. +// To provide a custom HTTP client, use option.WithHTTPClient. +// If you are using google.golang.org/api/googleapis/transport.APIKey, use option.WithAPIKey with NewService instead. +func New(client *http.Client) (*Service, error) { + if client == nil { + return nil, errors.New("client is nil") + } + s := &Service{client: client, BasePath: basePath} + s.Projects = NewProjectsService(s) + return s, nil +} + +type Service struct { + client *http.Client + BasePath string // API endpoint base URL + UserAgent string // optional additional User-Agent fragment + + Projects *ProjectsService +} + +func (s *Service) userAgent() string { + if s.UserAgent == "" { + return googleapi.UserAgent + } + return googleapi.UserAgent + " " + s.UserAgent +} + +func NewProjectsService(s *Service) *ProjectsService { + rs := &ProjectsService{s: s} + rs.Locations = NewProjectsLocationsService(s) + return rs +} + +type ProjectsService struct { + s *Service + + Locations *ProjectsLocationsService +} + +func NewProjectsLocationsService(s *Service) *ProjectsLocationsService { + rs := &ProjectsLocationsService{s: s} + rs.Backups = NewProjectsLocationsBackupsService(s) + rs.Clusters = NewProjectsLocationsClustersService(s) + rs.Operations = NewProjectsLocationsOperationsService(s) + rs.SupportedDatabaseFlags = NewProjectsLocationsSupportedDatabaseFlagsService(s) + return rs +} + +type ProjectsLocationsService struct { + s *Service + + Backups *ProjectsLocationsBackupsService + + Clusters *ProjectsLocationsClustersService + + Operations *ProjectsLocationsOperationsService + + SupportedDatabaseFlags *ProjectsLocationsSupportedDatabaseFlagsService +} + +func NewProjectsLocationsBackupsService(s *Service) *ProjectsLocationsBackupsService { + rs := &ProjectsLocationsBackupsService{s: s} + return rs +} + +type ProjectsLocationsBackupsService struct { + s *Service +} + +func NewProjectsLocationsClustersService(s *Service) *ProjectsLocationsClustersService { + rs := &ProjectsLocationsClustersService{s: s} + rs.Instances = NewProjectsLocationsClustersInstancesService(s) + rs.Users = NewProjectsLocationsClustersUsersService(s) + return rs +} + +type ProjectsLocationsClustersService struct { + s *Service + + Instances *ProjectsLocationsClustersInstancesService + + Users *ProjectsLocationsClustersUsersService +} + +func NewProjectsLocationsClustersInstancesService(s *Service) *ProjectsLocationsClustersInstancesService { + rs := &ProjectsLocationsClustersInstancesService{s: s} + return rs +} + +type ProjectsLocationsClustersInstancesService struct { + s *Service +} + +func NewProjectsLocationsClustersUsersService(s *Service) *ProjectsLocationsClustersUsersService { + rs := &ProjectsLocationsClustersUsersService{s: s} + return rs +} + +type ProjectsLocationsClustersUsersService struct { + s *Service +} + +func NewProjectsLocationsOperationsService(s *Service) *ProjectsLocationsOperationsService { + rs := &ProjectsLocationsOperationsService{s: s} + return rs +} + +type ProjectsLocationsOperationsService struct { + s *Service +} + +func NewProjectsLocationsSupportedDatabaseFlagsService(s *Service) *ProjectsLocationsSupportedDatabaseFlagsService { + rs := &ProjectsLocationsSupportedDatabaseFlagsService{s: s} + return rs +} + +type ProjectsLocationsSupportedDatabaseFlagsService struct { + s *Service +} + +// AutomatedBackupPolicy: Message describing the user-specified +// automated backup policy. All fields in the automated backup policy +// are optional. Defaults for each field are provided if they are not +// set. +type AutomatedBackupPolicy struct { + // BackupWindow: The length of the time window during which a backup can + // be taken. If a backup does not succeed within this time window, it + // will be canceled and considered failed. The backup window must be at + // least 5 minutes long. There is no upper bound on the window. If not + // set, it defaults to 1 hour. + BackupWindow string `json:"backupWindow,omitempty"` + + // Enabled: Whether automated automated backups are enabled. If not set, + // defaults to true. + Enabled bool `json:"enabled,omitempty"` + + // EncryptionConfig: Optional. The encryption config can be specified to + // encrypt the backups with a customer-managed encryption key (CMEK). + // When this field is not specified, the backup will then use default + // encryption scheme to protect the user data. + EncryptionConfig *EncryptionConfig `json:"encryptionConfig,omitempty"` + + // Labels: Labels to apply to backups created using this configuration. + Labels map[string]string `json:"labels,omitempty"` + + // Location: The location where the backup will be stored. Currently, + // the only supported option is to store the backup in the same region + // as the cluster. If empty, defaults to the region of the cluster. + Location string `json:"location,omitempty"` + + // QuantityBasedRetention: Quantity-based Backup retention policy to + // retain recent backups. + QuantityBasedRetention *QuantityBasedRetention `json:"quantityBasedRetention,omitempty"` + + // TimeBasedRetention: Time-based Backup retention policy. + TimeBasedRetention *TimeBasedRetention `json:"timeBasedRetention,omitempty"` + + // WeeklySchedule: Weekly schedule for the Backup. + WeeklySchedule *WeeklySchedule `json:"weeklySchedule,omitempty"` + + // ForceSendFields is a list of field names (e.g. "BackupWindow") 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. "BackupWindow") 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 *AutomatedBackupPolicy) MarshalJSON() ([]byte, error) { + type NoMethod AutomatedBackupPolicy + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// Backup: Message describing Backup object +type Backup struct { + // Annotations: Annotations to allow client tools to store small amount + // of arbitrary data. This is distinct from labels. + // https://google.aip.dev/128 + Annotations map[string]string `json:"annotations,omitempty"` + + // ClusterName: Required. The full resource name of the backup source + // cluster (e.g., + // projects/{project}/locations/{region}/clusters/{cluster_id}). + ClusterName string `json:"clusterName,omitempty"` + + // ClusterUid: Output only. The system-generated UID of the cluster + // which was used to create this resource. + ClusterUid string `json:"clusterUid,omitempty"` + + // CreateTime: Output only. Create time stamp + CreateTime string `json:"createTime,omitempty"` + + // DatabaseVersion: Output only. The database engine major version of + // the cluster this backup was created from. Any restored cluster + // created from this backup will have the same database version. + // + // Possible values: + // "DATABASE_VERSION_UNSPECIFIED" - This is an unknown database + // version. + // "POSTGRES_13" - DEPRECATED - The database version is Postgres 13. + // "POSTGRES_14" - The database version is Postgres 14. + // "POSTGRES_15" - The database version is Postgres 15. + DatabaseVersion string `json:"databaseVersion,omitempty"` + + // DeleteTime: Output only. Delete time stamp + DeleteTime string `json:"deleteTime,omitempty"` + + // Description: User-provided description of the backup. + Description string `json:"description,omitempty"` + + // DisplayName: User-settable and human-readable display name for the + // Backup. + DisplayName string `json:"displayName,omitempty"` + + // EncryptionConfig: Optional. The encryption config can be specified to + // encrypt the backup with a customer-managed encryption key (CMEK). + // When this field is not specified, the backup will then use default + // encryption scheme to protect the user data. + EncryptionConfig *EncryptionConfig `json:"encryptionConfig,omitempty"` + + // EncryptionInfo: Output only. The encryption information for the + // backup. + EncryptionInfo *EncryptionInfo `json:"encryptionInfo,omitempty"` + + // Etag: For Resource freshness validation (https://google.aip.dev/154) + Etag string `json:"etag,omitempty"` + + // ExpiryQuantity: Output only. The QuantityBasedExpiry of the backup, + // specified by the backup's retention policy. Once the expiry quantity + // is over retention, the backup is eligible to be garbage collected. + ExpiryQuantity *QuantityBasedExpiry `json:"expiryQuantity,omitempty"` + + // ExpiryTime: Output only. The time at which after the backup is + // eligible to be garbage collected. It is the duration specified by the + // backup's retention policy, added to the backup's create_time. + ExpiryTime string `json:"expiryTime,omitempty"` + + // Labels: Labels as key value pairs + Labels map[string]string `json:"labels,omitempty"` + + // Name: Output only. The name of the backup resource with the format: * + // projects/{project}/locations/{region}/backups/{backup_id} where the + // cluster and backup ID segments should satisfy the regex expression + // `[a-z]([a-z0-9-]{0,61}[a-z0-9])?`, e.g. 1-63 characters of lowercase + // letters, numbers, and dashes, starting with a letter, and ending with + // a letter or number. For more details see https://google.aip.dev/122. + // The prefix of the backup resource name is the name of the parent + // resource: * projects/{project}/locations/{region} + Name string `json:"name,omitempty"` + + // Reconciling: Output only. Reconciling + // (https://google.aip.dev/128#reconciliation), if true, indicates that + // the service is actively updating the resource. This can happen due to + // user-triggered updates or system actions like failover or + // maintenance. + Reconciling bool `json:"reconciling,omitempty"` + + // SatisfiesPzs: Reserved for future use. + SatisfiesPzs bool `json:"satisfiesPzs,omitempty"` + + // SizeBytes: Output only. The size of the backup in bytes. + SizeBytes int64 `json:"sizeBytes,omitempty,string"` + + // State: Output only. The current state of the backup. + // + // Possible values: + // "STATE_UNSPECIFIED" - The state of the backup is unknown. + // "READY" - The backup is ready. + // "CREATING" - The backup is creating. + // "FAILED" - The backup failed. + // "DELETING" - The backup is being deleted. + State string `json:"state,omitempty"` + + // Type: The backup type, which suggests the trigger for the backup. + // + // Possible values: + // "TYPE_UNSPECIFIED" - Backup Type is unknown. + // "ON_DEMAND" - ON_DEMAND backups that were triggered by the customer + // (e.g., not AUTOMATED). + // "AUTOMATED" - AUTOMATED backups triggered by the automated backups + // scheduler pursuant to an automated backup policy. + // "CONTINUOUS" - CONTINUOUS backups triggered by the automated + // backups scheduler due to a continuous backup policy. + Type string `json:"type,omitempty"` + + // Uid: Output only. The system-generated UID of the resource. The UID + // is assigned when the resource is created, and it is retained until it + // is deleted. + Uid string `json:"uid,omitempty"` + + // UpdateTime: Output only. Update time stamp + UpdateTime string `json:"updateTime,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the + // server. + googleapi.ServerResponse `json:"-"` + + // ForceSendFields is a list of field names (e.g. "Annotations") 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. "Annotations") 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 *Backup) MarshalJSON() ([]byte, error) { + type NoMethod Backup + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// BackupSource: Message describing a BackupSource. +type BackupSource struct { + // BackupName: Required. The name of the backup resource with the + // format: * projects/{project}/locations/{region}/backups/{backup_id} + BackupName string `json:"backupName,omitempty"` + + // BackupUid: Output only. The system-generated UID of the backup which + // was used to create this resource. The UID is generated when the + // backup is created, and it is retained until the backup is deleted. + BackupUid string `json:"backupUid,omitempty"` + + // ForceSendFields is a list of field names (e.g. "BackupName") 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. "BackupName") 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 *BackupSource) MarshalJSON() ([]byte, error) { + type NoMethod BackupSource + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// CancelOperationRequest: The request message for +// Operations.CancelOperation. +type CancelOperationRequest struct { +} + +// ClientConnectionConfig: Client connection configuration +type ClientConnectionConfig struct { + // RequireConnectors: Optional. Configuration to enforce connectors only + // (ex: AuthProxy) connections to the database. + RequireConnectors bool `json:"requireConnectors,omitempty"` + + // SslConfig: Optional. SSL config option for this instance. + SslConfig *SslConfig `json:"sslConfig,omitempty"` + + // ForceSendFields is a list of field names (e.g. "RequireConnectors") + // 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. "RequireConnectors") 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 *ClientConnectionConfig) MarshalJSON() ([]byte, error) { + type NoMethod ClientConnectionConfig + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// CloudControl2SharedOperationsReconciliationOperationMetadata: +// Operation metadata returned by the CLH during resource state +// reconciliation. +type CloudControl2SharedOperationsReconciliationOperationMetadata struct { + // DeleteResource: DEPRECATED. Use exclusive_action instead. + DeleteResource bool `json:"deleteResource,omitempty"` + + // ExclusiveAction: Excluisive action returned by the CLH. + // + // Possible values: + // "UNKNOWN_REPAIR_ACTION" - Unknown repair action. + // "DELETE" - The resource has to be deleted. When using this bit, the + // CLH should fail the operation. DEPRECATED. Instead use + // DELETE_RESOURCE OperationSignal in SideChannel. + // "RETRY" - This resource could not be repaired but the repair should + // be tried again at a later time. This can happen if there is a + // dependency that needs to be resolved first- e.g. if a parent resource + // must be repaired before a child resource. + ExclusiveAction string `json:"exclusiveAction,omitempty"` + + // ForceSendFields is a list of field names (e.g. "DeleteResource") 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. "DeleteResource") 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 *CloudControl2SharedOperationsReconciliationOperationMetadata) MarshalJSON() ([]byte, error) { + type NoMethod CloudControl2SharedOperationsReconciliationOperationMetadata + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// Cluster: A cluster is a collection of regional AlloyDB resources. It +// can include a primary instance and one or more read pool instances. +// All cluster resources share a storage layer, which scales as needed. +type Cluster struct { + // Annotations: Annotations to allow client tools to store small amount + // of arbitrary data. This is distinct from labels. + // https://google.aip.dev/128 + Annotations map[string]string `json:"annotations,omitempty"` + + // AutomatedBackupPolicy: The automated backup policy for this cluster. + // If no policy is provided then the default policy will be used. If + // backups are supported for the cluster, the default policy takes one + // backup a day, has a backup window of 1 hour, and retains backups for + // 14 days. For more information on the defaults, consult the + // documentation for the message type. + AutomatedBackupPolicy *AutomatedBackupPolicy `json:"automatedBackupPolicy,omitempty"` + + // BackupSource: Output only. Cluster created from backup. + BackupSource *BackupSource `json:"backupSource,omitempty"` + + // ClusterType: Output only. The type of the cluster. This is an + // output-only field and it's populated at the Cluster creation time or + // the Cluster promotion time. The cluster type is determined by which + // RPC was used to create the cluster (i.e. `CreateCluster` vs. + // `CreateSecondaryCluster` + // + // Possible values: + // "CLUSTER_TYPE_UNSPECIFIED" - The type of the cluster is unknown. + // "PRIMARY" - Primary cluster that support read and write operations. + // "SECONDARY" - Secondary cluster that is replicating from another + // region. This only supports read. + ClusterType string `json:"clusterType,omitempty"` + + // ContinuousBackupConfig: Optional. Continuous backup configuration for + // this cluster. + ContinuousBackupConfig *ContinuousBackupConfig `json:"continuousBackupConfig,omitempty"` + + // ContinuousBackupInfo: Output only. Continuous backup properties for + // this cluster. + ContinuousBackupInfo *ContinuousBackupInfo `json:"continuousBackupInfo,omitempty"` + + // CreateTime: Output only. Create time stamp + CreateTime string `json:"createTime,omitempty"` + + // DatabaseVersion: Optional. The database engine major version. This is + // an optional field and it is populated at the Cluster creation time. + // If a database version is not supplied at cluster creation time, then + // a default database version will be used. + // + // Possible values: + // "DATABASE_VERSION_UNSPECIFIED" - This is an unknown database + // version. + // "POSTGRES_13" - DEPRECATED - The database version is Postgres 13. + // "POSTGRES_14" - The database version is Postgres 14. + // "POSTGRES_15" - The database version is Postgres 15. + DatabaseVersion string `json:"databaseVersion,omitempty"` + + // DeleteTime: Output only. Delete time stamp + DeleteTime string `json:"deleteTime,omitempty"` + + // DisplayName: User-settable and human-readable display name for the + // Cluster. + DisplayName string `json:"displayName,omitempty"` + + // EncryptionConfig: Optional. The encryption config can be specified to + // encrypt the data disks and other persistent data resources of a + // cluster with a customer-managed encryption key (CMEK). When this + // field is not specified, the cluster will then use default encryption + // scheme to protect the user data. + EncryptionConfig *EncryptionConfig `json:"encryptionConfig,omitempty"` + + // EncryptionInfo: Output only. The encryption information for the + // cluster. + EncryptionInfo *EncryptionInfo `json:"encryptionInfo,omitempty"` + + // Etag: For Resource freshness validation (https://google.aip.dev/154) + Etag string `json:"etag,omitempty"` + + // InitialUser: Input only. Initial user to setup during cluster + // creation. Required. If used in `RestoreCluster` this is ignored. + InitialUser *UserPassword `json:"initialUser,omitempty"` + + // Labels: Labels as key value pairs + Labels map[string]string `json:"labels,omitempty"` + + // MigrationSource: Output only. Cluster created via DMS migration. + MigrationSource *MigrationSource `json:"migrationSource,omitempty"` + + // Name: Output only. The name of the cluster resource with the format: + // * projects/{project}/locations/{region}/clusters/{cluster_id} where + // the cluster ID segment should satisfy the regex expression + // `[a-z0-9-]+`. For more details see https://google.aip.dev/122. The + // prefix of the cluster resource name is the name of the parent + // resource: * projects/{project}/locations/{region} + Name string `json:"name,omitempty"` + + // Network: Required. The resource link for the VPC network in which + // cluster resources are created and from which they are accessible via + // Private IP. The network must belong to the same project as the + // cluster. It is specified in the form: + // "projects/{project}/global/networks/{network_id}". This is required + // to create a cluster. It can be updated, but it cannot be removed. + // Deprecated, use network_config.network instead. + Network string `json:"network,omitempty"` + + NetworkConfig *NetworkConfig `json:"networkConfig,omitempty"` + + // PrimaryConfig: Output only. Cross Region replication config specific + // to PRIMARY cluster. + PrimaryConfig *PrimaryConfig `json:"primaryConfig,omitempty"` + + // Reconciling: Output only. Reconciling + // (https://google.aip.dev/128#reconciliation). Set to true if the + // current state of Cluster does not match the user's intended state, + // and the service is actively updating the resource to reconcile them. + // This can happen due to user-triggered updates or system actions like + // failover or maintenance. + Reconciling bool `json:"reconciling,omitempty"` + + // SatisfiesPzs: Reserved for future use. + SatisfiesPzs bool `json:"satisfiesPzs,omitempty"` + + // SecondaryConfig: Cross Region replication config specific to + // SECONDARY cluster. + SecondaryConfig *SecondaryConfig `json:"secondaryConfig,omitempty"` + + // SslConfig: SSL configuration for this AlloyDB cluster. + SslConfig *SslConfig `json:"sslConfig,omitempty"` + + // State: Output only. The current serving state of the cluster. + // + // Possible values: + // "STATE_UNSPECIFIED" - The state of the cluster is unknown. + // "READY" - The cluster is active and running. + // "STOPPED" - The cluster is stopped. All instances in the cluster + // are stopped. Customers can start a stopped cluster at any point and + // all their instances will come back to life with same names and IP + // resources. In this state, customer pays for storage. Associated + // backups could also be present in a stopped cluster. + // "EMPTY" - The cluster is empty and has no associated resources. All + // instances, associated storage and backups have been deleted. + // "CREATING" - The cluster is being created. + // "DELETING" - The cluster is being deleted. + // "FAILED" - The creation of the cluster failed. + // "BOOTSTRAPPING" - The cluster is bootstrapping with data from some + // other source. Direct mutations to the cluster (e.g. adding read pool) + // are not allowed. + // "MAINTENANCE" - The cluster is under maintenance. AlloyDB regularly + // performs maintenance and upgrades on customer clusters. Updates on + // the cluster are not allowed while the cluster is in this state. + // "PROMOTING" - The cluster is being promoted. + State string `json:"state,omitempty"` + + // Uid: Output only. The system-generated UID of the resource. The UID + // is assigned when the resource is created, and it is retained until it + // is deleted. + Uid string `json:"uid,omitempty"` + + // UpdateTime: Output only. Update time stamp + UpdateTime string `json:"updateTime,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the + // server. + googleapi.ServerResponse `json:"-"` + + // ForceSendFields is a list of field names (e.g. "Annotations") 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. "Annotations") 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 *Cluster) MarshalJSON() ([]byte, error) { + type NoMethod Cluster + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// ConnectionInfo: ConnectionInfo singleton resource. +// https://google.aip.dev/156 +type ConnectionInfo struct { + // InstanceUid: Output only. The unique ID of the Instance. + InstanceUid string `json:"instanceUid,omitempty"` + + // IpAddress: Output only. The private network IP address for the + // Instance. This is the default IP for the instance and is always + // created (even if enable_public_ip is set). This is the connection + // endpoint for an end-user application. + IpAddress string `json:"ipAddress,omitempty"` + + // Name: The name of the ConnectionInfo singleton resource, e.g.: + // projects/{project}/locations/{location}/clusters/*/instances/*/connect + // ionInfo This field currently has no semantic meaning. + Name string `json:"name,omitempty"` + + // PemCertificateChain: Output only. The pem-encoded chain that may be + // used to verify the X.509 certificate. Expected to be in + // issuer-to-root order according to RFC 5246. + PemCertificateChain []string `json:"pemCertificateChain,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the + // server. + googleapi.ServerResponse `json:"-"` + + // ForceSendFields is a list of field names (e.g. "InstanceUid") 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. "InstanceUid") 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 *ConnectionInfo) MarshalJSON() ([]byte, error) { + type NoMethod ConnectionInfo + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// ContinuousBackupConfig: ContinuousBackupConfig describes the +// continuous backups recovery configurations of a cluster. +type ContinuousBackupConfig struct { + // Enabled: Whether ContinuousBackup is enabled. + Enabled bool `json:"enabled,omitempty"` + + // EncryptionConfig: The encryption config can be specified to encrypt + // the backups with a customer-managed encryption key (CMEK). When this + // field is not specified, the backup will then use default encryption + // scheme to protect the user data. + EncryptionConfig *EncryptionConfig `json:"encryptionConfig,omitempty"` + + // RecoveryWindowDays: The number of days that are eligible to restore + // from using PITR. To support the entire recovery window, backups and + // logs are retained for one day more than the recovery window. If not + // set, defaults to 14 days. + RecoveryWindowDays int64 `json:"recoveryWindowDays,omitempty"` + + // 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. "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:"-"` +} + +func (s *ContinuousBackupConfig) MarshalJSON() ([]byte, error) { + type NoMethod ContinuousBackupConfig + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// ContinuousBackupInfo: ContinuousBackupInfo describes the continuous +// backup properties of a cluster. +type ContinuousBackupInfo struct { + // EarliestRestorableTime: Output only. The earliest restorable time + // that can be restored to. Output only field. + EarliestRestorableTime string `json:"earliestRestorableTime,omitempty"` + + // EnabledTime: Output only. When ContinuousBackup was most recently + // enabled. Set to null if ContinuousBackup is not enabled. + EnabledTime string `json:"enabledTime,omitempty"` + + // EncryptionInfo: Output only. The encryption information for the WALs + // and backups required for ContinuousBackup. + EncryptionInfo *EncryptionInfo `json:"encryptionInfo,omitempty"` + + // Schedule: Output only. Days of the week on which a continuous backup + // is taken. Output only field. Ignored if passed into the request. + // + // Possible values: + // "DAY_OF_WEEK_UNSPECIFIED" - The day of the week is unspecified. + // "MONDAY" - Monday + // "TUESDAY" - Tuesday + // "WEDNESDAY" - Wednesday + // "THURSDAY" - Thursday + // "FRIDAY" - Friday + // "SATURDAY" - Saturday + // "SUNDAY" - Sunday + Schedule []string `json:"schedule,omitempty"` + + // ForceSendFields is a list of field names (e.g. + // "EarliestRestorableTime") 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. "EarliestRestorableTime") + // 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 *ContinuousBackupInfo) MarshalJSON() ([]byte, error) { + type NoMethod ContinuousBackupInfo + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// ContinuousBackupSource: Message describing a ContinuousBackupSource. +type ContinuousBackupSource struct { + // Cluster: Required. The source cluster from which to restore. This + // cluster must have continuous backup enabled for this operation to + // succeed. For the required format, see the comment on the Cluster.name + // field. + Cluster string `json:"cluster,omitempty"` + + // PointInTime: Required. The point in time to restore to. + PointInTime string `json:"pointInTime,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Cluster") 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. "Cluster") 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 *ContinuousBackupSource) MarshalJSON() ([]byte, error) { + type NoMethod ContinuousBackupSource + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// Empty: A generic empty message that you can re-use to avoid defining +// duplicated empty messages in your APIs. A typical example is to use +// it as the request or the response type of an API method. For +// instance: service Foo { rpc Bar(google.protobuf.Empty) returns +// (google.protobuf.Empty); } +type Empty struct { + // ServerResponse contains the HTTP response code and headers from the + // server. + googleapi.ServerResponse `json:"-"` +} + +// EncryptionConfig: EncryptionConfig describes the encryption config of +// a cluster or a backup that is encrypted with a CMEK (customer-managed +// encryption key). +type EncryptionConfig struct { + // KmsKeyName: The fully-qualified resource name of the KMS key. Each + // Cloud KMS key is regionalized and has the following format: + // projects/[PROJECT]/locations/[REGION]/keyRings/[RING]/cryptoKeys/[KEY_ + // NAME] + KmsKeyName string `json:"kmsKeyName,omitempty"` + + // ForceSendFields is a list of field names (e.g. "KmsKeyName") 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. "KmsKeyName") 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 *EncryptionConfig) MarshalJSON() ([]byte, error) { + type NoMethod EncryptionConfig + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// EncryptionInfo: EncryptionInfo describes the encryption information +// of a cluster or a backup. +type EncryptionInfo struct { + // EncryptionType: Output only. Type of encryption. + // + // Possible values: + // "TYPE_UNSPECIFIED" - Encryption type not specified. Defaults to + // GOOGLE_DEFAULT_ENCRYPTION. + // "GOOGLE_DEFAULT_ENCRYPTION" - The data is encrypted at rest with a + // key that is fully managed by Google. No key version will be + // populated. This is the default state. + // "CUSTOMER_MANAGED_ENCRYPTION" - The data is encrypted at rest with + // a key that is managed by the customer. KMS key versions will be + // populated. + EncryptionType string `json:"encryptionType,omitempty"` + + // KmsKeyVersions: Output only. Cloud KMS key versions that are being + // used to protect the database or the backup. + KmsKeyVersions []string `json:"kmsKeyVersions,omitempty"` + + // ForceSendFields is a list of field names (e.g. "EncryptionType") 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. "EncryptionType") 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 *EncryptionInfo) MarshalJSON() ([]byte, error) { + type NoMethod EncryptionInfo + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// FailoverInstanceRequest: Message for triggering failover on an +// Instance +type FailoverInstanceRequest struct { + // RequestId: Optional. An optional request ID to identify requests. + // Specify a unique request ID so that if you must retry your request, + // the server will know to ignore the request if it has already been + // completed. The server will guarantee that for at least 60 minutes + // after the first request. For example, consider a situation where you + // make an initial request and the request times out. If you make the + // request again with the same request ID, the server can check if + // original operation with the same request ID was received, and if so, + // will ignore the second request. This prevents clients from + // accidentally creating duplicate commitments. The request ID must be a + // valid UUID with the exception that zero UUID is not supported + // (00000000-0000-0000-0000-000000000000). + RequestId string `json:"requestId,omitempty"` + + // ValidateOnly: Optional. If set, performs request validation (e.g. + // permission checks and any other type of validation), but do not + // actually execute the failover. + ValidateOnly bool `json:"validateOnly,omitempty"` + + // ForceSendFields is a list of field names (e.g. "RequestId") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "RequestId") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *FailoverInstanceRequest) MarshalJSON() ([]byte, error) { + type NoMethod FailoverInstanceRequest + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// GenerateClientCertificateRequest: Message for requests to generate a +// client certificate signed by the Cluster CA. +type GenerateClientCertificateRequest struct { + // CertDuration: Optional. An optional hint to the endpoint to generate + // the client certificate with the requested duration. The duration can + // be from 1 hour to 24 hours. The endpoint may or may not honor the + // hint. If the hint is left unspecified or is not honored, then the + // endpoint will pick an appropriate default duration. + CertDuration string `json:"certDuration,omitempty"` + + // PemCsr: Optional. A pem-encoded X.509 certificate signing request + // (CSR). + PemCsr string `json:"pemCsr,omitempty"` + + // PublicKey: Optional. The public key from the client. + PublicKey string `json:"publicKey,omitempty"` + + // RequestId: Optional. An optional request ID to identify requests. + // Specify a unique request ID so that if you must retry your request, + // the server will know to ignore the request if it has already been + // completed. The server will guarantee that for at least 60 minutes + // after the first request. For example, consider a situation where you + // make an initial request and the request times out. If you make the + // request again with the same request ID, the server can check if + // original operation with the same request ID was received, and if so, + // will ignore the second request. This prevents clients from + // accidentally creating duplicate commitments. The request ID must be a + // valid UUID with the exception that zero UUID is not supported + // (00000000-0000-0000-0000-000000000000). + RequestId string `json:"requestId,omitempty"` + + // UseMetadataExchange: Optional. An optional hint to the endpoint to + // generate a client ceritificate that can be used by AlloyDB connectors + // to exchange additional metadata with the server after TLS handshake. + UseMetadataExchange bool `json:"useMetadataExchange,omitempty"` + + // ForceSendFields is a list of field names (e.g. "CertDuration") 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. "CertDuration") 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 *GenerateClientCertificateRequest) MarshalJSON() ([]byte, error) { + type NoMethod GenerateClientCertificateRequest + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// GenerateClientCertificateResponse: Message returned by a +// GenerateClientCertificate operation. +type GenerateClientCertificateResponse struct { + // CaCert: Optional. The pem-encoded cluster ca X.509 certificate. + CaCert string `json:"caCert,omitempty"` + + // PemCertificate: Output only. The pem-encoded, signed X.509 + // certificate. + PemCertificate string `json:"pemCertificate,omitempty"` + + // PemCertificateChain: Output only. The pem-encoded chain that may be + // used to verify the X.509 certificate. Expected to be in + // issuer-to-root order according to RFC 5246. + PemCertificateChain []string `json:"pemCertificateChain,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the + // server. + googleapi.ServerResponse `json:"-"` + + // ForceSendFields is a list of field names (e.g. "CaCert") 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. "CaCert") 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 *GenerateClientCertificateResponse) MarshalJSON() ([]byte, error) { + type NoMethod GenerateClientCertificateResponse + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// GoogleCloudLocationListLocationsResponse: The response message for +// Locations.ListLocations. +type GoogleCloudLocationListLocationsResponse struct { + // Locations: A list of locations that matches the specified filter in + // the request. + Locations []*GoogleCloudLocationLocation `json:"locations,omitempty"` + + // NextPageToken: The standard List next-page token. + NextPageToken string `json:"nextPageToken,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the + // server. + googleapi.ServerResponse `json:"-"` + + // ForceSendFields is a list of field names (e.g. "Locations") 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. "Locations") 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 *GoogleCloudLocationListLocationsResponse) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudLocationListLocationsResponse + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// GoogleCloudLocationLocation: A resource that represents a Google +// Cloud location. +type GoogleCloudLocationLocation struct { + // DisplayName: The friendly name for this location, typically a nearby + // city name. For example, "Tokyo". + DisplayName string `json:"displayName,omitempty"` + + // Labels: Cross-service attributes for the location. For example + // {"cloud.googleapis.com/region": "us-east1"} + Labels map[string]string `json:"labels,omitempty"` + + // LocationId: The canonical id for this location. For example: + // "us-east1". + LocationId string `json:"locationId,omitempty"` + + // Metadata: Service-specific metadata. For example the available + // capacity at the given location. + Metadata googleapi.RawMessage `json:"metadata,omitempty"` + + // Name: Resource name for the location, which may vary between + // implementations. For example: + // "projects/example-project/locations/us-east1" + Name string `json:"name,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the + // server. + googleapi.ServerResponse `json:"-"` + + // ForceSendFields is a list of field names (e.g. "DisplayName") 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. "DisplayName") 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 *GoogleCloudLocationLocation) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudLocationLocation + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// GoogleTypeTimeOfDay: Represents a time of day. The date and time zone +// are either not significant or are specified elsewhere. An API may +// choose to allow leap seconds. Related types are google.type.Date and +// `google.protobuf.Timestamp`. +type GoogleTypeTimeOfDay struct { + // Hours: Hours of day in 24 hour format. Should be from 0 to 23. An API + // may choose to allow the value "24:00:00" for scenarios like business + // closing time. + Hours int64 `json:"hours,omitempty"` + + // Minutes: Minutes of hour of day. Must be from 0 to 59. + Minutes int64 `json:"minutes,omitempty"` + + // Nanos: Fractions of seconds in nanoseconds. Must be from 0 to + // 999,999,999. + Nanos int64 `json:"nanos,omitempty"` + + // Seconds: Seconds of minutes of the time. Must normally be from 0 to + // 59. An API may allow the value 60 if it allows leap-seconds. + Seconds int64 `json:"seconds,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Hours") 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. "Hours") 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 *GoogleTypeTimeOfDay) MarshalJSON() ([]byte, error) { + type NoMethod GoogleTypeTimeOfDay + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// InjectFaultRequest: Message for triggering fault injection on an +// instance +type InjectFaultRequest struct { + // FaultType: Required. The type of fault to be injected in an instance. + // + // Possible values: + // "FAULT_TYPE_UNSPECIFIED" - The fault type is unknown. + // "STOP_VM" - Stop the VM + FaultType string `json:"faultType,omitempty"` + + // RequestId: Optional. An optional request ID to identify requests. + // Specify a unique request ID so that if you must retry your request, + // the server will know to ignore the request if it has already been + // completed. The server will guarantee that for at least 60 minutes + // after the first request. For example, consider a situation where you + // make an initial request and the request times out. If you make the + // request again with the same request ID, the server can check if + // original operation with the same request ID was received, and if so, + // will ignore the second request. This prevents clients from + // accidentally creating duplicate commitments. The request ID must be a + // valid UUID with the exception that zero UUID is not supported + // (00000000-0000-0000-0000-000000000000). + RequestId string `json:"requestId,omitempty"` + + // ValidateOnly: Optional. If set, performs request validation (e.g. + // permission checks and any other type of validation), but do not + // actually execute the fault injection. + ValidateOnly bool `json:"validateOnly,omitempty"` + + // ForceSendFields is a list of field names (e.g. "FaultType") 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. "FaultType") 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 *InjectFaultRequest) MarshalJSON() ([]byte, error) { + type NoMethod InjectFaultRequest + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// Instance: An Instance is a computing unit that an end customer can +// connect to. It's the main unit of computing resources in AlloyDB. +type Instance struct { + // Annotations: Annotations to allow client tools to store small amount + // of arbitrary data. This is distinct from labels. + // https://google.aip.dev/128 + Annotations map[string]string `json:"annotations,omitempty"` + + // AvailabilityType: Availability type of an Instance. If empty, + // defaults to REGIONAL for primary instances. For read pools, + // availability_type is always UNSPECIFIED. Instances in the read pools + // are evenly distributed across available zones within the region (i.e. + // read pools with more than one node will have a node in at least two + // zones). + // + // Possible values: + // "AVAILABILITY_TYPE_UNSPECIFIED" - This is an unknown Availability + // type. + // "ZONAL" - Zonal available instance. + // "REGIONAL" - Regional (or Highly) available instance. + AvailabilityType string `json:"availabilityType,omitempty"` + + // ClientConnectionConfig: Optional. Client connection specific + // configurations + ClientConnectionConfig *ClientConnectionConfig `json:"clientConnectionConfig,omitempty"` + + // CreateTime: Output only. Create time stamp + CreateTime string `json:"createTime,omitempty"` + + // DatabaseFlags: Database flags. Set at instance level. * They are + // copied from primary instance on read instance creation. * Read + // instances can set new or override existing flags that are relevant + // for reads, e.g. for enabling columnar cache on a read instance. Flags + // set on read instance may or may not be present on primary. This is a + // list of "key": "value" pairs. "key": The name of the flag. These + // flags are passed at instance setup time, so include both server + // options and system variables for Postgres. Flags are specified with + // underscores, not hyphens. "value": The value of the flag. Booleans + // are set to **on** for true and **off** for false. This field must be + // omitted if the flag doesn't take a value. + DatabaseFlags map[string]string `json:"databaseFlags,omitempty"` + + // DeleteTime: Output only. Delete time stamp + DeleteTime string `json:"deleteTime,omitempty"` + + // DisplayName: User-settable and human-readable display name for the + // Instance. + DisplayName string `json:"displayName,omitempty"` + + // Etag: For Resource freshness validation (https://google.aip.dev/154) + Etag string `json:"etag,omitempty"` + + // GceZone: The Compute Engine zone that the instance should serve from, + // per https://cloud.google.com/compute/docs/regions-zones This can ONLY + // be specified for ZONAL instances. If present for a REGIONAL instance, + // an error will be thrown. If this is absent for a ZONAL instance, + // instance is created in a random zone with available capacity. + GceZone string `json:"gceZone,omitempty"` + + // InstanceType: Required. The type of the instance. Specified at + // creation time. + // + // Possible values: + // "INSTANCE_TYPE_UNSPECIFIED" - The type of the instance is unknown. + // "PRIMARY" - PRIMARY instances support read and write operations. + // "READ_POOL" - READ POOL instances support read operations only. + // Each read pool instance consists of one or more homogeneous nodes. * + // Read pool of size 1 can only have zonal availability. * Read pools + // with node count of 2 or more can have regional availability (nodes + // are present in 2 or more zones in a region). + // "SECONDARY" - SECONDARY instances support read operations only. + // SECONDARY instance is a cross-region read replica + InstanceType string `json:"instanceType,omitempty"` + + // IpAddress: Output only. The IP address for the Instance. This is the + // connection endpoint for an end-user application. + IpAddress string `json:"ipAddress,omitempty"` + + // Labels: Labels as key value pairs + Labels map[string]string `json:"labels,omitempty"` + + // MachineConfig: Configurations for the machines that host the + // underlying database engine. + MachineConfig *MachineConfig `json:"machineConfig,omitempty"` + + // Name: Output only. The name of the instance resource with the format: + // * + // projects/{project}/locations/{region}/clusters/{cluster_id}/instances/ + // {instance_id} where the cluster and instance ID segments should + // satisfy the regex expression `[a-z]([a-z0-9-]{0,61}[a-z0-9])?`, e.g. + // 1-63 characters of lowercase letters, numbers, and dashes, starting + // with a letter, and ending with a letter or number. For more details + // see https://google.aip.dev/122. The prefix of the instance resource + // name is the name of the parent resource: * + // projects/{project}/locations/{region}/clusters/{cluster_id} + Name string `json:"name,omitempty"` + + // Nodes: Output only. List of available read-only VMs in this instance, + // including the standby for a PRIMARY instance. + Nodes []*Node `json:"nodes,omitempty"` + + // QueryInsightsConfig: Configuration for query insights. + QueryInsightsConfig *QueryInsightsInstanceConfig `json:"queryInsightsConfig,omitempty"` + + // ReadPoolConfig: Read pool specific config. + ReadPoolConfig *ReadPoolConfig `json:"readPoolConfig,omitempty"` + + // Reconciling: Output only. Reconciling + // (https://google.aip.dev/128#reconciliation). Set to true if the + // current state of Instance does not match the user's intended state, + // and the service is actively updating the resource to reconcile them. + // This can happen due to user-triggered updates or system actions like + // failover or maintenance. + Reconciling bool `json:"reconciling,omitempty"` + + // SatisfiesPzs: Reserved for future use. + SatisfiesPzs bool `json:"satisfiesPzs,omitempty"` + + // State: Output only. The current serving state of the instance. + // + // Possible values: + // "STATE_UNSPECIFIED" - The state of the instance is unknown. + // "READY" - The instance is active and running. + // "STOPPED" - The instance is stopped. Instance name and IP resources + // are preserved. + // "CREATING" - The instance is being created. + // "DELETING" - The instance is being deleted. + // "MAINTENANCE" - The instance is down for maintenance. + // "FAILED" - The creation of the instance failed or a fatal error + // occurred during an operation on the instance. Note: Instances in this + // state would tried to be auto-repaired. And Customers should be able + // to restart, update or delete these instances. + // "BOOTSTRAPPING" - Index 7 is used in the producer apis for + // ROLLED_BACK state. Keeping that index unused in case that state also + // needs to exposed via consumer apis in future. The instance has been + // configured to sync data from some other source. + // "PROMOTING" - The instance is being promoted. + State string `json:"state,omitempty"` + + // Uid: Output only. The system-generated UID of the resource. The UID + // is assigned when the resource is created, and it is retained until it + // is deleted. + Uid string `json:"uid,omitempty"` + + // UpdatePolicy: Update policy that will be applied during instance + // update. This field is not persisted when you update the instance. To + // use a non-default update policy, you must specify explicitly specify + // the value in each update request. + UpdatePolicy *UpdatePolicy `json:"updatePolicy,omitempty"` + + // UpdateTime: Output only. Update time stamp + UpdateTime string `json:"updateTime,omitempty"` + + // WritableNode: Output only. This is set for the read-write VM of the + // PRIMARY instance only. + WritableNode *Node `json:"writableNode,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the + // server. + googleapi.ServerResponse `json:"-"` + + // ForceSendFields is a list of field names (e.g. "Annotations") 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. "Annotations") 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 *Instance) MarshalJSON() ([]byte, error) { + type NoMethod Instance + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// IntegerRestrictions: Restrictions on INTEGER type values. +type IntegerRestrictions struct { + // MaxValue: The maximum value that can be specified, if applicable. + MaxValue int64 `json:"maxValue,omitempty,string"` + + // MinValue: The minimum value that can be specified, if applicable. + MinValue int64 `json:"minValue,omitempty,string"` + + // ForceSendFields is a list of field names (e.g. "MaxValue") 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. "MaxValue") 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 *IntegerRestrictions) MarshalJSON() ([]byte, error) { + type NoMethod IntegerRestrictions + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// ListBackupsResponse: Message for response to listing Backups +type ListBackupsResponse struct { + // Backups: The list of Backup + Backups []*Backup `json:"backups,omitempty"` + + // NextPageToken: A token identifying a page of results the server + // should return. + NextPageToken string `json:"nextPageToken,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. "Backups") 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. "Backups") 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 *ListBackupsResponse) MarshalJSON() ([]byte, error) { + type NoMethod ListBackupsResponse + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// ListClustersResponse: Message for response to listing Clusters +type ListClustersResponse struct { + // Clusters: The list of Cluster + Clusters []*Cluster `json:"clusters,omitempty"` + + // NextPageToken: A token identifying a page of results the server + // should return. + NextPageToken string `json:"nextPageToken,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. "Clusters") 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. "Clusters") 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 *ListClustersResponse) MarshalJSON() ([]byte, error) { + type NoMethod ListClustersResponse + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// ListInstancesResponse: Message for response to listing Instances +type ListInstancesResponse struct { + // Instances: The list of Instance + Instances []*Instance `json:"instances,omitempty"` + + // NextPageToken: A token identifying a page of results the server + // should return. + NextPageToken string `json:"nextPageToken,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. "Instances") 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. "Instances") 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 *ListInstancesResponse) MarshalJSON() ([]byte, error) { + type NoMethod ListInstancesResponse + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// ListOperationsResponse: The response message for +// Operations.ListOperations. +type ListOperationsResponse struct { + // NextPageToken: The standard List next-page token. + NextPageToken string `json:"nextPageToken,omitempty"` + + // Operations: A list of operations that matches the specified filter in + // the request. + Operations []*Operation `json:"operations,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 *ListOperationsResponse) MarshalJSON() ([]byte, error) { + type NoMethod ListOperationsResponse + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// ListSupportedDatabaseFlagsResponse: Message for response to listing +// SupportedDatabaseFlags. +type ListSupportedDatabaseFlagsResponse struct { + // NextPageToken: A token identifying a page of results the server + // should return. + NextPageToken string `json:"nextPageToken,omitempty"` + + // SupportedDatabaseFlags: The list of SupportedDatabaseFlags. + SupportedDatabaseFlags []*SupportedDatabaseFlag `json:"supportedDatabaseFlags,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 *ListSupportedDatabaseFlagsResponse) MarshalJSON() ([]byte, error) { + type NoMethod ListSupportedDatabaseFlagsResponse + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// ListUsersResponse: Message for response to listing Users +type ListUsersResponse struct { + // NextPageToken: A token identifying a page of results the server + // should return. + NextPageToken string `json:"nextPageToken,omitempty"` + + // Unreachable: Locations that could not be reached. + Unreachable []string `json:"unreachable,omitempty"` + + // Users: The list of User + Users []*User `json:"users,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 *ListUsersResponse) MarshalJSON() ([]byte, error) { + type NoMethod ListUsersResponse + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// MachineConfig: MachineConfig describes the configuration of a +// machine. +type MachineConfig struct { + // CpuCount: The number of CPU's in the VM instance. + CpuCount int64 `json:"cpuCount,omitempty"` + + // ForceSendFields is a list of field names (e.g. "CpuCount") 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. "CpuCount") 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 *MachineConfig) MarshalJSON() ([]byte, error) { + type NoMethod MachineConfig + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// MigrationSource: Subset of the source instance configuration that is +// available when reading the cluster resource. +type MigrationSource struct { + // HostPort: Output only. The host and port of the on-premises instance + // in host:port format + HostPort string `json:"hostPort,omitempty"` + + // ReferenceId: Output only. Place holder for the external source + // identifier(e.g DMS job name) that created the cluster. + ReferenceId string `json:"referenceId,omitempty"` + + // SourceType: Output only. Type of migration source. + // + // Possible values: + // "MIGRATION_SOURCE_TYPE_UNSPECIFIED" - Migration source is unknown. + // "DMS" - DMS source means the cluster was created via DMS migration + // job. + SourceType string `json:"sourceType,omitempty"` + + // ForceSendFields is a list of field names (e.g. "HostPort") 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. "HostPort") 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 *MigrationSource) MarshalJSON() ([]byte, error) { + type NoMethod MigrationSource + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// NetworkConfig: Metadata related to network configuration. +type NetworkConfig struct { + // AllocatedIpRange: Optional. Name of the allocated IP range for the + // private IP AlloyDB cluster, for example: + // "google-managed-services-default". If set, the instance IPs for this + // cluster will be created in the allocated range. The range name must + // comply with RFC 1035. Specifically, the name must be 1-63 characters + // long and match the regular expression a-z ([-a-z0-9]*[a-z0-9])?. + // Field name is intended to be consistent with CloudSQL. + AllocatedIpRange string `json:"allocatedIpRange,omitempty"` + + // Network: Required. The resource link for the VPC network in which + // cluster resources are created and from which they are accessible via + // Private IP. The network must belong to the same project as the + // cluster. It is specified in the form: + // "projects/{project_number}/global/networks/{network_id}". This is + // required to create a cluster. It can be updated, but it cannot be + // removed. + Network string `json:"network,omitempty"` + + // ForceSendFields is a list of field names (e.g. "AllocatedIpRange") 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. "AllocatedIpRange") 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 *NetworkConfig) MarshalJSON() ([]byte, error) { + type NoMethod NetworkConfig + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// Node: Details of a single node in the instance. Nodes in an AlloyDB +// instance are ephemereal, they can change during update, failover, +// autohealing and resize operations. +type Node struct { + // Id: The identifier of the VM e.g. "test-read-0601-407e52be-ms3l". + Id string `json:"id,omitempty"` + + // Ip: The private IP address of the VM e.g. "10.57.0.34". + Ip string `json:"ip,omitempty"` + + // State: Determined by state of the compute VM and postgres-service + // health. Compute VM state can have values listed in + // https://cloud.google.com/compute/docs/instances/instance-life-cycle + // and postgres-service health can have values: HEALTHY and UNHEALTHY. + State string `json:"state,omitempty"` + + // ZoneId: The Compute Engine zone of the VM e.g. "us-central1-b". + ZoneId string `json:"zoneId,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 *Node) MarshalJSON() ([]byte, error) { + type NoMethod Node + 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 { + // Done: If the value is `false`, it means the operation is still in + // progress. If `true`, the operation is completed, and either `error` + // or `response` is available. + Done bool `json:"done,omitempty"` + + // Error: The error result of the operation in case of failure or + // cancellation. + Error *Status `json:"error,omitempty"` + + // Metadata: Service-specific metadata associated with the operation. It + // typically contains progress information and common metadata such as + // create time. Some services might not provide such metadata. Any + // method that returns a long-running operation should document the + // metadata type, if any. + Metadata googleapi.RawMessage `json:"metadata,omitempty"` + + // Name: The server-assigned name, which is only unique within the same + // service that originally returns it. If you use the default HTTP + // mapping, the `name` should be a resource name ending with + // `operations/{unique_id}`. + Name string `json:"name,omitempty"` + + // Response: The normal, successful response of the operation. If the + // original method returns no data on success, such as `Delete`, the + // response is `google.protobuf.Empty`. If the original method is + // standard `Get`/`Create`/`Update`, the response should be the + // resource. For other methods, the response should have the type + // `XxxResponse`, where `Xxx` is the original method name. For example, + // if the original method name is `TakeSnapshot()`, the inferred + // response type is `TakeSnapshotResponse`. + Response googleapi.RawMessage `json:"response,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the + // server. + googleapi.ServerResponse `json:"-"` + + // ForceSendFields is a list of field names (e.g. "Done") 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. "Done") 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 *Operation) MarshalJSON() ([]byte, error) { + type NoMethod Operation + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// OperationMetadata: Represents the metadata of the long-running +// operation. +type OperationMetadata struct { + // ApiVersion: Output only. API version used to start the operation. + ApiVersion string `json:"apiVersion,omitempty"` + + // CreateTime: Output only. The time the operation was created. + CreateTime string `json:"createTime,omitempty"` + + // EndTime: Output only. The time the operation finished running. + EndTime string `json:"endTime,omitempty"` + + // RequestedCancellation: Output only. Identifies whether the user has + // requested cancellation of the operation. Operations that have + // successfully been cancelled have Operation.error value with a + // google.rpc.Status.code of 1, corresponding to `Code.CANCELLED`. + RequestedCancellation bool `json:"requestedCancellation,omitempty"` + + // StatusMessage: Output only. Human-readable status of the operation, + // if any. + StatusMessage string `json:"statusMessage,omitempty"` + + // Target: Output only. Server-defined resource path for the target of + // the operation. + Target string `json:"target,omitempty"` + + // Verb: Output only. Name of the verb executed by the operation. + Verb string `json:"verb,omitempty"` + + // ForceSendFields is a list of field names (e.g. "ApiVersion") 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. "ApiVersion") 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 *OperationMetadata) MarshalJSON() ([]byte, error) { + type NoMethod OperationMetadata + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// PrimaryConfig: Configuration for the primary cluster. It has the list +// of clusters that are replicating from this cluster. This should be +// set if and only if the cluster is of type PRIMARY. +type PrimaryConfig struct { + // SecondaryClusterNames: Output only. Names of the clusters that are + // replicating from this cluster. + SecondaryClusterNames []string `json:"secondaryClusterNames,omitempty"` + + // ForceSendFields is a list of field names (e.g. + // "SecondaryClusterNames") 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. "SecondaryClusterNames") 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 *PrimaryConfig) MarshalJSON() ([]byte, error) { + type NoMethod PrimaryConfig + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// PromoteClusterRequest: Message for promoting a Cluster +type PromoteClusterRequest struct { + // Etag: Optional. The current etag of the Cluster. If an etag is + // provided and does not match the current etag of the Cluster, deletion + // will be blocked and an ABORTED error will be returned. + Etag string `json:"etag,omitempty"` + + // RequestId: Optional. An optional request ID to identify requests. + // Specify a unique request ID so that if you must retry your request, + // the server will know to ignore the request if it has already been + // completed. The server will guarantee that for at least 60 minutes + // after the first request. For example, consider a situation where you + // make an initial request and the request times out. If you make the + // request again with the same request ID, the server can check if + // original operation with the same request ID was received, and if so, + // will ignore the second request. This prevents clients from + // accidentally creating duplicate commitments. The request ID must be a + // valid UUID with the exception that zero UUID is not supported + // (00000000-0000-0000-0000-000000000000). + RequestId string `json:"requestId,omitempty"` + + // ValidateOnly: Optional. If set, performs request validation (e.g. + // permission checks and any other type of validation), but do not + // actually execute the delete. + ValidateOnly bool `json:"validateOnly,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Etag") 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. "Etag") 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 *PromoteClusterRequest) MarshalJSON() ([]byte, error) { + type NoMethod PromoteClusterRequest + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// QuantityBasedExpiry: A backup's position in a quantity-based +// retention queue, of backups with the same source cluster and type, +// with length, retention, specified by the backup's retention policy. +// Once the position is greater than the retention, the backup is +// eligible to be garbage collected. Example: 5 backups from the same +// source cluster and type with a quantity-based retention of 3 and +// denoted by backup_id (position, retention). Safe: backup_5 (1, 3), +// backup_4, (2, 3), backup_3 (3, 3). Awaiting garbage collection: +// backup_2 (4, 3), backup_1 (5, 3) +type QuantityBasedExpiry struct { + // RetentionCount: Output only. The backup's position among its backups + // with the same source cluster and type, by descending chronological + // order create time(i.e. newest first). + RetentionCount int64 `json:"retentionCount,omitempty"` + + // TotalRetentionCount: Output only. The length of the quantity-based + // queue, specified by the backup's retention policy. + TotalRetentionCount int64 `json:"totalRetentionCount,omitempty"` + + // ForceSendFields is a list of field names (e.g. "RetentionCount") 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. "RetentionCount") 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 *QuantityBasedExpiry) MarshalJSON() ([]byte, error) { + type NoMethod QuantityBasedExpiry + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// QuantityBasedRetention: A quantity based policy specifies that a +// certain number of the most recent successful backups should be +// retained. +type QuantityBasedRetention struct { + // Count: The number of backups to retain. + Count int64 `json:"count,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Count") 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. "Count") 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 *QuantityBasedRetention) MarshalJSON() ([]byte, error) { + type NoMethod QuantityBasedRetention + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// QueryInsightsInstanceConfig: QueryInsights Instance specific +// configuration. +type QueryInsightsInstanceConfig struct { + // QueryPlansPerMinute: Number of query execution plans captured by + // Insights per minute for all queries combined. The default value is 5. + // Any integer between 0 and 20 is considered valid. + QueryPlansPerMinute int64 `json:"queryPlansPerMinute,omitempty"` + + // QueryStringLength: Query string length. The default value is 1024. + // Any integer between 256 and 4500 is considered valid. + QueryStringLength int64 `json:"queryStringLength,omitempty"` + + // RecordApplicationTags: Record application tags for an instance. This + // flag is turned "on" by default. + RecordApplicationTags bool `json:"recordApplicationTags,omitempty"` + + // RecordClientAddress: Record client address for an instance. Client + // address is PII information. This flag is turned "on" by default. + RecordClientAddress bool `json:"recordClientAddress,omitempty"` + + // ForceSendFields is a list of field names (e.g. "QueryPlansPerMinute") + // 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. "QueryPlansPerMinute") 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 *QueryInsightsInstanceConfig) MarshalJSON() ([]byte, error) { + type NoMethod QueryInsightsInstanceConfig + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// ReadPoolConfig: Configuration for a read pool instance. +type ReadPoolConfig struct { + // NodeCount: Read capacity, i.e. number of nodes in a read pool + // instance. + NodeCount int64 `json:"nodeCount,omitempty"` + + // ForceSendFields is a list of field names (e.g. "NodeCount") 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. "NodeCount") 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 *ReadPoolConfig) MarshalJSON() ([]byte, error) { + type NoMethod ReadPoolConfig + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +type RestartInstanceRequest struct { + // RequestId: Optional. An optional request ID to identify requests. + // Specify a unique request ID so that if you must retry your request, + // the server will know to ignore the request if it has already been + // completed. The server will guarantee that for at least 60 minutes + // after the first request. For example, consider a situation where you + // make an initial request and the request times out. If you make the + // request again with the same request ID, the server can check if + // original operation with the same request ID was received, and if so, + // will ignore the second request. This prevents clients from + // accidentally creating duplicate commitments. The request ID must be a + // valid UUID with the exception that zero UUID is not supported + // (00000000-0000-0000-0000-000000000000). + RequestId string `json:"requestId,omitempty"` + + // ValidateOnly: Optional. If set, performs request validation (e.g. + // permission checks and any other type of validation), but do not + // actually execute the restart. + ValidateOnly bool `json:"validateOnly,omitempty"` + + // ForceSendFields is a list of field names (e.g. "RequestId") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "RequestId") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *RestartInstanceRequest) MarshalJSON() ([]byte, error) { + type NoMethod RestartInstanceRequest + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// RestoreClusterRequest: Message for restoring a Cluster from a backup +// or another cluster at a given point in time. +type RestoreClusterRequest struct { + // BackupSource: Backup source. + BackupSource *BackupSource `json:"backupSource,omitempty"` + + // Cluster: Required. The resource being created + Cluster *Cluster `json:"cluster,omitempty"` + + // ClusterId: Required. ID of the requesting object. + ClusterId string `json:"clusterId,omitempty"` + + // ContinuousBackupSource: ContinuousBackup source. Continuous backup + // needs to be enabled in the source cluster for this operation to + // succeed. + ContinuousBackupSource *ContinuousBackupSource `json:"continuousBackupSource,omitempty"` + + // RequestId: Optional. An optional request ID to identify requests. + // Specify a unique request ID so that if you must retry your request, + // the server will know to ignore the request if it has already been + // completed. The server will guarantee that for at least 60 minutes + // since the first request. For example, consider a situation where you + // make an initial request and the request times out. If you make the + // request again with the same request ID, the server can check if + // original operation with the same request ID was received, and if so, + // will ignore the second request. This prevents clients from + // accidentally creating duplicate commitments. The request ID must be a + // valid UUID with the exception that zero UUID is not supported + // (00000000-0000-0000-0000-000000000000). + RequestId string `json:"requestId,omitempty"` + + // ValidateOnly: Optional. If set, performs request validation (e.g. + // permission checks and any other type of validation), but do not + // actually execute the import request. + ValidateOnly bool `json:"validateOnly,omitempty"` + + // ForceSendFields is a list of field names (e.g. "BackupSource") 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. "BackupSource") 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 *RestoreClusterRequest) MarshalJSON() ([]byte, error) { + type NoMethod RestoreClusterRequest + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// SecondaryConfig: Configuration information for the secondary cluster. +// This should be set if and only if the cluster is of type SECONDARY. +type SecondaryConfig struct { + // PrimaryClusterName: The name of the primary cluster name with the + // format: * projects/{project}/locations/{region}/clusters/{cluster_id} + PrimaryClusterName string `json:"primaryClusterName,omitempty"` + + // ForceSendFields is a list of field names (e.g. "PrimaryClusterName") + // 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. "PrimaryClusterName") 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 *SecondaryConfig) MarshalJSON() ([]byte, error) { + type NoMethod SecondaryConfig + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// SslConfig: SSL configuration. +type SslConfig struct { + // CaSource: Optional. Certificate Authority (CA) source. Only + // CA_SOURCE_MANAGED is supported currently, and is the default value. + // + // Possible values: + // "CA_SOURCE_UNSPECIFIED" - Certificate Authority (CA) source not + // specified. Defaults to CA_SOURCE_MANAGED. + // "CA_SOURCE_MANAGED" - Certificate Authority (CA) managed by the + // AlloyDB Cluster. + CaSource string `json:"caSource,omitempty"` + + // SslMode: Optional. SSL mode. Specifies client-server SSL/TLS + // connection behavior. + // + // Possible values: + // "SSL_MODE_UNSPECIFIED" - SSL mode not specified. Defaults to + // ENCRYPTED_ONLY. + // "SSL_MODE_ALLOW" - SSL connections are optional. CA verification + // not enforced. + // "SSL_MODE_REQUIRE" - SSL connections are required. CA verification + // not enforced. Clients may use locally self-signed certificates + // (default psql client behavior). + // "SSL_MODE_VERIFY_CA" - SSL connections are required. CA + // verification enforced. Clients must have certificates signed by a + // Cluster CA, e.g. via GenerateClientCertificate. + // "ALLOW_UNENCRYPTED_AND_ENCRYPTED" - SSL connections are optional. + // CA verification not enforced. + // "ENCRYPTED_ONLY" - SSL connections are required. CA verification + // not enforced. + SslMode string `json:"sslMode,omitempty"` + + // ForceSendFields is a list of field names (e.g. "CaSource") 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. "CaSource") 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 *SslConfig) MarshalJSON() ([]byte, error) { + type NoMethod SslConfig + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// Status: The `Status` type defines a logical error model that is +// suitable for different programming environments, including REST APIs +// and RPC APIs. It is used by gRPC (https://github.com/grpc). Each +// `Status` message contains three pieces of data: error code, error +// message, and error details. You can find out more about this error +// model and how to work with it in the API Design Guide +// (https://cloud.google.com/apis/design/errors). +type Status struct { + // Code: The status code, which should be an enum value of + // google.rpc.Code. + Code int64 `json:"code,omitempty"` + + // Details: A list of messages that carry the error details. There is a + // common set of message types for APIs to use. + Details []googleapi.RawMessage `json:"details,omitempty"` + + // Message: A developer-facing error message, which should be in + // English. Any user-facing error message should be localized and sent + // in the google.rpc.Status.details field, or localized by the client. + Message string `json:"message,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Code") 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. "Code") 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 *Status) MarshalJSON() ([]byte, error) { + type NoMethod Status + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// StorageDatabasecenterPartnerapiV1mainAvailabilityConfiguration: +// Configuration for availability of database instance +type StorageDatabasecenterPartnerapiV1mainAvailabilityConfiguration struct { + // AvailabilityType: Availability type. Potential values: * `ZONAL`: The + // instance serves data from only one zone. Outages in that zone affect + // data accessibility. * `REGIONAL`: The instance can serve data from + // more than one zone in a region (it is highly available). + // + // Possible values: + // "AVAILABILITY_TYPE_UNSPECIFIED" + // "ZONAL" - Zonal available instance. + // "REGIONAL" - Regional available instance. + // "MULTI_REGIONAL" - Multi regional instance + // "AVAILABILITY_TYPE_OTHER" - For rest of the other category + AvailabilityType string `json:"availabilityType,omitempty"` + + ExternalReplicaConfigured bool `json:"externalReplicaConfigured,omitempty"` + + PromotableReplicaConfigured bool `json:"promotableReplicaConfigured,omitempty"` + + // ForceSendFields is a list of field names (e.g. "AvailabilityType") 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. "AvailabilityType") 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 *StorageDatabasecenterPartnerapiV1mainAvailabilityConfiguration) MarshalJSON() ([]byte, error) { + type NoMethod StorageDatabasecenterPartnerapiV1mainAvailabilityConfiguration + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// StorageDatabasecenterPartnerapiV1mainBackupConfiguration: +// Configuration for automatic backups +type StorageDatabasecenterPartnerapiV1mainBackupConfiguration struct { + // AutomatedBackupEnabled: Whether customer visible automated backups + // are enabled on the instance. + AutomatedBackupEnabled bool `json:"automatedBackupEnabled,omitempty"` + + // BackupRetentionSettings: Backup retention settings. + BackupRetentionSettings *StorageDatabasecenterPartnerapiV1mainRetentionSettings `json:"backupRetentionSettings,omitempty"` + + // ForceSendFields is a list of field names (e.g. + // "AutomatedBackupEnabled") 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. "AutomatedBackupEnabled") + // 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 *StorageDatabasecenterPartnerapiV1mainBackupConfiguration) MarshalJSON() ([]byte, error) { + type NoMethod StorageDatabasecenterPartnerapiV1mainBackupConfiguration + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// StorageDatabasecenterPartnerapiV1mainBackupRun: A backup run. +type StorageDatabasecenterPartnerapiV1mainBackupRun struct { + // EndTime: The time the backup operation completed. REQUIRED + EndTime string `json:"endTime,omitempty"` + + // Error: Information about why the backup operation failed. This is + // only present if the run has the FAILED status. OPTIONAL + Error *StorageDatabasecenterPartnerapiV1mainOperationError `json:"error,omitempty"` + + // StartTime: The time the backup operation started. REQUIRED + StartTime string `json:"startTime,omitempty"` + + // Status: The status of this run. REQUIRED + // + // Possible values: + // "STATUS_UNSPECIFIED" + // "SUCCESSFUL" - The backup was successful. + // "FAILED" - The backup was unsuccessful. + Status string `json:"status,omitempty"` + + // ForceSendFields is a list of field names (e.g. "EndTime") 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. "EndTime") 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 *StorageDatabasecenterPartnerapiV1mainBackupRun) MarshalJSON() ([]byte, error) { + type NoMethod StorageDatabasecenterPartnerapiV1mainBackupRun + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// StorageDatabasecenterPartnerapiV1mainDatabaseResourceFeed: +// DatabaseResourceFeed is the top level proto to be used to ingest +// different database resource level events into Condor platform. +type StorageDatabasecenterPartnerapiV1mainDatabaseResourceFeed struct { + // FeedTimestamp: Required. Timestamp when feed is generated. + FeedTimestamp string `json:"feedTimestamp,omitempty"` + + // FeedType: Required. Type feed to be ingested into condor + // + // Possible values: + // "FEEDTYPE_UNSPECIFIED" + // "RESOURCE_METADATA" - Database resource metadata feed from control + // plane + // "OBSERVABILITY_DATA" - Database resource monitoring data + // "COMPLIANCE_DATA" - Database resource compliance feed + FeedType string `json:"feedType,omitempty"` + + // ResourceId: Required. Primary key associated with the Resource + ResourceId *StorageDatabasecenterPartnerapiV1mainDatabaseResourceId `json:"resourceId,omitempty"` + + // ResourceMetadata: More feed data would be added in subsequent CLs + ResourceMetadata *StorageDatabasecenterPartnerapiV1mainDatabaseResourceMetadata `json:"resourceMetadata,omitempty"` + + // ForceSendFields is a list of field names (e.g. "FeedTimestamp") 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. "FeedTimestamp") 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 *StorageDatabasecenterPartnerapiV1mainDatabaseResourceFeed) MarshalJSON() ([]byte, error) { + type NoMethod StorageDatabasecenterPartnerapiV1mainDatabaseResourceFeed + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// StorageDatabasecenterPartnerapiV1mainDatabaseResourceId: +// DatabaseResourceId will serve as primary key for any resource +// ingestion event. +type StorageDatabasecenterPartnerapiV1mainDatabaseResourceId struct { + // Provider: Required. Cloud provider name. Ex: + // GCP/AWS/Azure/OnPrem/SelfManaged + // + // Possible values: + // "PROVIDER_UNSPECIFIED" + // "GCP" - Google cloud platform provider + // "AWS" - Amazon web service + // "AZURE" - Azure web service + // "ONPREM" - On-prem database provider + // "SELFMANAGED" - Self-managed database provider + // "PROVIDER_OTHER" - For rest of the other category + Provider string `json:"provider,omitempty"` + + // ResourceType: Required. The type of resource this ID is identifying. + // Ex google.sqladmin.Instance, google.alloydb.cluster, + // google.sqladmin.Backup REQUIRED + ResourceType string `json:"resourceType,omitempty"` + + // UniqueId: Required. A service-local token that distinguishes this + // resource from other resources within the same service. + UniqueId string `json:"uniqueId,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Provider") 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. "Provider") 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 *StorageDatabasecenterPartnerapiV1mainDatabaseResourceId) MarshalJSON() ([]byte, error) { + type NoMethod StorageDatabasecenterPartnerapiV1mainDatabaseResourceId + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// StorageDatabasecenterPartnerapiV1mainDatabaseResourceMetadata: Common +// model for database resource instance metadata. +type StorageDatabasecenterPartnerapiV1mainDatabaseResourceMetadata struct { + // AvailabilityConfiguration: Availability configuration for this + // instance + AvailabilityConfiguration *StorageDatabasecenterPartnerapiV1mainAvailabilityConfiguration `json:"availabilityConfiguration,omitempty"` + + // BackupConfiguration: Backup configuration for this instance + BackupConfiguration *StorageDatabasecenterPartnerapiV1mainBackupConfiguration `json:"backupConfiguration,omitempty"` + + // BackupRun: Latest backup run information for this instance + BackupRun *StorageDatabasecenterPartnerapiV1mainBackupRun `json:"backupRun,omitempty"` + + // CreationTime: The creation time of the resource, i.e. the time when + // resource is created and recorded in partner service. + CreationTime string `json:"creationTime,omitempty"` + + // CurrentState: Current state of the instance. + // + // Possible values: + // "STATE_UNSPECIFIED" + // "HEALTHY" - The instance is running. + // "UNHEALTHY" - Instance being created, updated, deleted or under + // maintenance + // "STATE_OTHER" - For rest of the other category + CurrentState string `json:"currentState,omitempty"` + + // ExpectedState: The actual instance state. + // + // Possible values: + // "STATE_UNSPECIFIED" + // "HEALTHY" - The instance is running. + // "UNHEALTHY" - Instance being created, updated, deleted or under + // maintenance + // "STATE_OTHER" - For rest of the other category + ExpectedState string `json:"expectedState,omitempty"` + + // Id: Required. Unique identifier for a Database resource + Id *StorageDatabasecenterPartnerapiV1mainDatabaseResourceId `json:"id,omitempty"` + + // InstanceType: The type of the instance. Specified at creation time. + // + // Possible values: + // "INSTANCE_TYPE_UNSPECIFIED" + // "PRIMARY" - A regular primary database instance. + // "READ_REPLICA" - An instance acting as a read-replica. + // "OTHER" - For rest of the other categories. + InstanceType string `json:"instanceType,omitempty"` + + // Location: The resource location. REQUIRED + Location string `json:"location,omitempty"` + + // PrimaryResourceId: Unique identifier for this resource's immediate + // parent resource. This parent resource id would be used to build + // resource hierarchy in condor platform. + PrimaryResourceId *StorageDatabasecenterPartnerapiV1mainDatabaseResourceId `json:"primaryResourceId,omitempty"` + + // Product: The product this resource represents. + Product *StorageDatabasecenterProtoCommonProduct `json:"product,omitempty"` + + // ResourceContainer: Closest parent Cloud Resource Manager container of + // this resource. It must either be resource name of a Cloud Resource + // Manager project, for ex: "projects/123". + ResourceContainer string `json:"resourceContainer,omitempty"` + + // ResourceName: Required. Different from unique_id, a resource name can + // be reused over time. That is after a resource named "ABC" is deleted, + // the name "ABC" can be used to to create a new resource within the + // same source. + ResourceName string `json:"resourceName,omitempty"` + + // UpdationTime: The time at which the resource was updated and recorded + // at partner service. + UpdationTime string `json:"updationTime,omitempty"` + + // UserLabels: User-provided labels, represented as a dictionary where + // each label is a single key value pair. + UserLabels map[string]string `json:"userLabels,omitempty"` + + // ForceSendFields is a list of field names (e.g. + // "AvailabilityConfiguration") 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. + // "AvailabilityConfiguration") 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 *StorageDatabasecenterPartnerapiV1mainDatabaseResourceMetadata) MarshalJSON() ([]byte, error) { + type NoMethod StorageDatabasecenterPartnerapiV1mainDatabaseResourceMetadata + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// StorageDatabasecenterPartnerapiV1mainOperationError: An error that +// occurred during a backup creation operation. +type StorageDatabasecenterPartnerapiV1mainOperationError struct { + // Code: Identifies the specific error that occurred. REQUIRED + Code string `json:"code,omitempty"` + + // Message: Additional information about the error encountered. REQUIRED + Message string `json:"message,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Code") 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. "Code") 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 *StorageDatabasecenterPartnerapiV1mainOperationError) MarshalJSON() ([]byte, error) { + type NoMethod StorageDatabasecenterPartnerapiV1mainOperationError + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +type StorageDatabasecenterPartnerapiV1mainRetentionSettings struct { + QuantityBasedRetention int64 `json:"quantityBasedRetention,omitempty"` + + // RetentionUnit: The unit that 'retained_backups' represents. + // + // Possible values: + // "RETENTION_UNIT_UNSPECIFIED" - Backup retention unit is + // unspecified, will be treated as COUNT. + // "COUNT" - Retention will be by count, eg. "retain the most recent 7 + // backups". + // "TIME" - Retention will be by Time, eg. "retain the last 7 days + // backups". + // "RETENTION_UNIT_OTHER" - For rest of the other category + RetentionUnit string `json:"retentionUnit,omitempty"` + + TimeBasedRetention string `json:"timeBasedRetention,omitempty"` + + // ForceSendFields is a list of field names (e.g. + // "QuantityBasedRetention") 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. "QuantityBasedRetention") + // 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 *StorageDatabasecenterPartnerapiV1mainRetentionSettings) MarshalJSON() ([]byte, error) { + type NoMethod StorageDatabasecenterPartnerapiV1mainRetentionSettings + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// StorageDatabasecenterProtoCommonProduct: Product specification for +// Condor resources. +type StorageDatabasecenterProtoCommonProduct struct { + // Engine: The specific engine that the underlying database is running. + // + // Possible values: + // "ENGINE_UNSPECIFIED" - UNSPECIFIED means engine type is not known + // or available. + // "MYSQL" - MySQL binary running as engine in database instance. + // "POSTGRES" - Postgres binary running as engine in database + // instance. + // "SQL_SERVER" - SQLServer binary running as engine in database + // instance. + // "NATIVE" - Native database binary running as engine in instance. + // "SPANGRES" - Cloud Spanner with Postgres dialect. + // "ENGINE_OTHER" - Other refers to rest of other database engine. + // This is to be when engine is known, but it is not present in this + // enum. + Engine string `json:"engine,omitempty"` + + // Type: Type of specific database product. It could be CloudSQL, + // AlloyDB etc.. + // + // Possible values: + // "PRODUCT_TYPE_UNSPECIFIED" - UNSPECIFIED means product type is not + // known or available. + // "CLOUD_SQL" - Cloud SQL product area in GCP + // "ALLOYDB" - AlloyDB product area in GCP + // "SPANNER" - Spanner product area in GCP + // "ON_PREM" - On premises database product. + // "PRODUCT_TYPE_OTHER" - Other refers to rest of other product type. + // This is to be when product type is known, but it is not present in + // this enum. + Type string `json:"type,omitempty"` + + // Version: Version of the underlying database engine. Example values: + // For MySQL, it could be "8.0", "5.7" etc.. For Postgres, it could be + // "14", "15" etc.. + Version string `json:"version,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Engine") 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. "Engine") 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 *StorageDatabasecenterProtoCommonProduct) MarshalJSON() ([]byte, error) { + type NoMethod StorageDatabasecenterProtoCommonProduct + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// StringRestrictions: Restrictions on STRING type values +type StringRestrictions struct { + // AllowedValues: The list of allowed values, if bounded. This field + // will be empty if there is a unbounded number of allowed values. + AllowedValues []string `json:"allowedValues,omitempty"` + + // ForceSendFields is a list of field names (e.g. "AllowedValues") 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. "AllowedValues") 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 *StringRestrictions) MarshalJSON() ([]byte, error) { + type NoMethod StringRestrictions + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// SupportedDatabaseFlag: SupportedDatabaseFlag gives general +// information about a database flag, like type and allowed values. This +// is a static value that is defined on the server side, and it cannot +// be modified by callers. To set the Database flags on a particular +// Instance, a caller should modify the Instance.database_flags field. +type SupportedDatabaseFlag struct { + // AcceptsMultipleValues: Whether the database flag accepts multiple + // values. If true, a comma-separated list of stringified values may be + // specified. + AcceptsMultipleValues bool `json:"acceptsMultipleValues,omitempty"` + + // FlagName: The name of the database flag, e.g. "max_allowed_packets". + // The is a possibly key for the Instance.database_flags map field. + FlagName string `json:"flagName,omitempty"` + + // IntegerRestrictions: Restriction on INTEGER type value. + IntegerRestrictions *IntegerRestrictions `json:"integerRestrictions,omitempty"` + + // Name: The name of the flag resource, following Google Cloud + // conventions, e.g.: * + // projects/{project}/locations/{location}/flags/{flag} This field + // currently has no semantic meaning. + Name string `json:"name,omitempty"` + + // RequiresDbRestart: Whether setting or updating this flag on an + // Instance requires a database restart. If a flag that requires + // database restart is set, the backend will automatically restart the + // database (making sure to satisfy any availability SLO's). + RequiresDbRestart bool `json:"requiresDbRestart,omitempty"` + + // StringRestrictions: Restriction on STRING type value. + StringRestrictions *StringRestrictions `json:"stringRestrictions,omitempty"` + + // SupportedDbVersions: Major database engine versions for which this + // flag is supported. + // + // Possible values: + // "DATABASE_VERSION_UNSPECIFIED" - This is an unknown database + // version. + // "POSTGRES_13" - DEPRECATED - The database version is Postgres 13. + // "POSTGRES_14" - The database version is Postgres 14. + // "POSTGRES_15" - The database version is Postgres 15. + SupportedDbVersions []string `json:"supportedDbVersions,omitempty"` + + // Possible values: + // "VALUE_TYPE_UNSPECIFIED" - This is an unknown flag type. + // "STRING" - String type flag. + // "INTEGER" - Integer type flag. + // "FLOAT" - Float type flag. + // "NONE" - Denotes that the flag does not accept any values. + ValueType string `json:"valueType,omitempty"` + + // ForceSendFields is a list of field names (e.g. + // "AcceptsMultipleValues") 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. "AcceptsMultipleValues") 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 *SupportedDatabaseFlag) MarshalJSON() ([]byte, error) { + type NoMethod SupportedDatabaseFlag + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// TimeBasedRetention: A time based retention policy specifies that all +// backups within a certain time period should be retained. +type TimeBasedRetention struct { + // RetentionPeriod: The retention period. + RetentionPeriod string `json:"retentionPeriod,omitempty"` + + // ForceSendFields is a list of field names (e.g. "RetentionPeriod") 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. "RetentionPeriod") 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 *TimeBasedRetention) MarshalJSON() ([]byte, error) { + type NoMethod TimeBasedRetention + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// UpdatePolicy: Policy to be used while updating the instance. +type UpdatePolicy struct { + // Mode: Mode for updating the instance. + // + // Possible values: + // "MODE_UNSPECIFIED" - Mode is unknown. + // "DEFAULT" - Least disruptive way to apply the update. + // "FORCE_APPLY" - Performs a forced update when applicable. This will + // be fast but may incur a downtime. + Mode string `json:"mode,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Mode") 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. "Mode") 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 *UpdatePolicy) MarshalJSON() ([]byte, error) { + type NoMethod UpdatePolicy + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// User: Message describing User object. +type User struct { + // DatabaseRoles: Optional. List of database roles this user has. The + // database role strings are subject to the PostgreSQL naming + // conventions. + DatabaseRoles []string `json:"databaseRoles,omitempty"` + + // Name: Output only. Name of the resource in the form of + // projects/{project}/locations/{location}/cluster/{cluster}/users/{user} + // . + Name string `json:"name,omitempty"` + + // Password: Input only. Password for the user. + Password string `json:"password,omitempty"` + + // UserType: Optional. Type of this user. + // + // Possible values: + // "USER_TYPE_UNSPECIFIED" - Unspecified user type. + // "ALLOYDB_BUILT_IN" - The default user type that authenticates via + // password-based authentication. + // "ALLOYDB_IAM_USER" - Database user that can authenticate via + // IAM-Based authentication. + UserType string `json:"userType,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 *User) MarshalJSON() ([]byte, error) { + type NoMethod User + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// UserPassword: The username/password for a database user. Used for +// specifying initial users at cluster creation time. +type UserPassword struct { + // Password: The initial password for the user. + Password string `json:"password,omitempty"` + + // User: The database username. + User string `json:"user,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Password") 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. "Password") 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 *UserPassword) MarshalJSON() ([]byte, error) { + type NoMethod UserPassword + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// WeeklySchedule: A weekly schedule starts a backup at prescribed start +// times within a day, for the specified days of the week. The weekly +// schedule message is flexible and can be used to create many types of +// schedules. For example, to have a daily backup that starts at 22:00, +// configure the `start_times` field to have one element "22:00" and the +// `days_of_week` field to have all seven days of the week. +type WeeklySchedule struct { + // DaysOfWeek: The days of the week to perform a backup. If this field + // is left empty, the default of every day of the week is used. + // + // Possible values: + // "DAY_OF_WEEK_UNSPECIFIED" - The day of the week is unspecified. + // "MONDAY" - Monday + // "TUESDAY" - Tuesday + // "WEDNESDAY" - Wednesday + // "THURSDAY" - Thursday + // "FRIDAY" - Friday + // "SATURDAY" - Saturday + // "SUNDAY" - Sunday + DaysOfWeek []string `json:"daysOfWeek,omitempty"` + + // StartTimes: The times during the day to start a backup. The start + // times are assumed to be in UTC and to be an exact hour (e.g., + // 04:00:00). If no start times are provided, a single fixed start time + // is chosen arbitrarily. + StartTimes []*GoogleTypeTimeOfDay `json:"startTimes,omitempty"` + + // ForceSendFields is a list of field names (e.g. "DaysOfWeek") 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. "DaysOfWeek") 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 *WeeklySchedule) MarshalJSON() ([]byte, error) { + type NoMethod WeeklySchedule + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// method id "alloydb.projects.locations.get": + +type ProjectsLocationsGetCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// Get: Gets information about a location. +// +// - name: Resource name for the location. +func (r *ProjectsLocationsService) Get(name string) *ProjectsLocationsGetCall { + c := &ProjectsLocationsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *ProjectsLocationsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsGetCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// IfNoneMatch sets the optional parameter which makes the operation +// fail if the object's ETag matches the given value. This is useful for +// getting updates only after the object has changed since the last +// request. Use googleapi.IsNotModified to check whether the response +// error from Do is the result of In-None-Match. +func (c *ProjectsLocationsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsGetCall { + c.ifNoneMatch_ = entityTag + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *ProjectsLocationsGetCall) Context(ctx context.Context) *ProjectsLocationsGetCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *ProjectsLocationsGetCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsGetCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) + } + var body io.Reader = nil + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+name}") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("GET", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "name": c.name, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "alloydb.projects.locations.get" call. +// Exactly one of *GoogleCloudLocationLocation or error will be non-nil. +// Any non-2xx status code is an error. Response headers are in either +// *GoogleCloudLocationLocation.ServerResponse.Header or (if a response +// was returned at all) in error.(*googleapi.Error).Header. Use +// googleapi.IsNotModified to check whether the returned error was +// because http.StatusNotModified was returned. +func (c *ProjectsLocationsGetCall) Do(opts ...googleapi.CallOption) (*GoogleCloudLocationLocation, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, gensupport.WrapError(&googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + }) + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, gensupport.WrapError(err) + } + ret := &GoogleCloudLocationLocation{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Gets information about a location.", + // "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}", + // "httpMethod": "GET", + // "id": "alloydb.projects.locations.get", + // "parameterOrder": [ + // "name" + // ], + // "parameters": { + // "name": { + // "description": "Resource name for the location.", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1alpha/{+name}", + // "response": { + // "$ref": "GoogleCloudLocationLocation" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "alloydb.projects.locations.list": + +type ProjectsLocationsListCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// List: Lists information about the supported locations for this +// service. +// +// - name: The resource that owns the locations collection, if +// applicable. +func (r *ProjectsLocationsService) List(name string) *ProjectsLocationsListCall { + c := &ProjectsLocationsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + return c +} + +// Filter sets the optional parameter "filter": A filter to narrow down +// results to a preferred subset. The filtering language accepts strings +// like "displayName=tokyo", and is documented in more detail in +// AIP-160 (https://google.aip.dev/160). +func (c *ProjectsLocationsListCall) Filter(filter string) *ProjectsLocationsListCall { + c.urlParams_.Set("filter", filter) + return c +} + +// PageSize sets the optional parameter "pageSize": The maximum number +// of results to return. If not set, the service selects a default. +func (c *ProjectsLocationsListCall) PageSize(pageSize int64) *ProjectsLocationsListCall { + c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) + return c +} + +// PageToken sets the optional parameter "pageToken": A page token +// received from the `next_page_token` field in the response. Send that +// page token to receive the subsequent page. +func (c *ProjectsLocationsListCall) PageToken(pageToken string) *ProjectsLocationsListCall { + c.urlParams_.Set("pageToken", pageToken) + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *ProjectsLocationsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsListCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// IfNoneMatch sets the optional parameter which makes the operation +// fail if the object's ETag matches the given value. This is useful for +// getting updates only after the object has changed since the last +// request. Use googleapi.IsNotModified to check whether the response +// error from Do is the result of In-None-Match. +func (c *ProjectsLocationsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsListCall { + c.ifNoneMatch_ = entityTag + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *ProjectsLocationsListCall) Context(ctx context.Context) *ProjectsLocationsListCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *ProjectsLocationsListCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsListCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) + } + var body io.Reader = nil + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+name}/locations") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("GET", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "name": c.name, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "alloydb.projects.locations.list" call. +// Exactly one of *GoogleCloudLocationListLocationsResponse or error +// will be non-nil. Any non-2xx status code is an error. Response +// headers are in either +// *GoogleCloudLocationListLocationsResponse.ServerResponse.Header or +// (if a response was returned at all) in +// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check +// whether the returned error was because http.StatusNotModified was +// returned. +func (c *ProjectsLocationsListCall) Do(opts ...googleapi.CallOption) (*GoogleCloudLocationListLocationsResponse, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, gensupport.WrapError(&googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + }) + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, gensupport.WrapError(err) + } + ret := &GoogleCloudLocationListLocationsResponse{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Lists information about the supported locations for this service.", + // "flatPath": "v1alpha/projects/{projectsId}/locations", + // "httpMethod": "GET", + // "id": "alloydb.projects.locations.list", + // "parameterOrder": [ + // "name" + // ], + // "parameters": { + // "filter": { + // "description": "A filter to narrow down results to a preferred subset. The filtering language accepts strings like `\"displayName=tokyo\"`, and is documented in more detail in [AIP-160](https://google.aip.dev/160).", + // "location": "query", + // "type": "string" + // }, + // "name": { + // "description": "The resource that owns the locations collection, if applicable.", + // "location": "path", + // "pattern": "^projects/[^/]+$", + // "required": true, + // "type": "string" + // }, + // "pageSize": { + // "description": "The maximum number of results to return. If not set, the service selects a default.", + // "format": "int32", + // "location": "query", + // "type": "integer" + // }, + // "pageToken": { + // "description": "A page token received from the `next_page_token` field in the response. Send that page token to receive the subsequent page.", + // "location": "query", + // "type": "string" + // } + // }, + // "path": "v1alpha/{+name}/locations", + // "response": { + // "$ref": "GoogleCloudLocationListLocationsResponse" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// Pages invokes f for each page of results. +// A non-nil error returned from f will halt the iteration. +// The provided context supersedes any context provided to the Context method. +func (c *ProjectsLocationsListCall) Pages(ctx context.Context, f func(*GoogleCloudLocationListLocationsResponse) 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 "alloydb.projects.locations.backups.create": + +type ProjectsLocationsBackupsCreateCall struct { + s *Service + parent string + backup *Backup + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Create: Creates a new Backup in a given project and location. +// +// - parent: Value for parent. +func (r *ProjectsLocationsBackupsService) Create(parent string, backup *Backup) *ProjectsLocationsBackupsCreateCall { + c := &ProjectsLocationsBackupsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + c.backup = backup + return c +} + +// BackupId sets the optional parameter "backupId": Required. ID of the +// requesting object. +func (c *ProjectsLocationsBackupsCreateCall) BackupId(backupId string) *ProjectsLocationsBackupsCreateCall { + c.urlParams_.Set("backupId", backupId) + return c +} + +// RequestId sets the optional parameter "requestId": An optional +// request ID to identify requests. Specify a unique request ID so that +// if you must retry your request, the server will know to ignore the +// request if it has already been completed. The server will guarantee +// that for at least 60 minutes since the first request. For example, +// consider a situation where you make an initial request and the +// request times out. If you make the request again with the same +// request ID, the server can check if original operation with the same +// request ID was received, and if so, will ignore the second request. +// This prevents clients from accidentally creating duplicate +// commitments. The request ID must be a valid UUID with the exception +// that zero UUID is not supported +// (00000000-0000-0000-0000-000000000000). +func (c *ProjectsLocationsBackupsCreateCall) RequestId(requestId string) *ProjectsLocationsBackupsCreateCall { + c.urlParams_.Set("requestId", requestId) + return c +} + +// ValidateOnly sets the optional parameter "validateOnly": If set, the +// backend validates the request, but doesn't actually execute it. +func (c *ProjectsLocationsBackupsCreateCall) ValidateOnly(validateOnly bool) *ProjectsLocationsBackupsCreateCall { + 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 *ProjectsLocationsBackupsCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsBackupsCreateCall { + 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 *ProjectsLocationsBackupsCreateCall) Context(ctx context.Context) *ProjectsLocationsBackupsCreateCall { + 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 *ProjectsLocationsBackupsCreateCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsBackupsCreateCall) 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.backup) + if err != nil { + return nil, err + } + reqHeaders.Set("Content-Type", "application/json") + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+parent}/backups") + 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 "alloydb.projects.locations.backups.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 *ProjectsLocationsBackupsCreateCall) Do(opts ...googleapi.CallOption) (*Operation, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, gensupport.WrapError(&googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + }) + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, gensupport.WrapError(err) + } + ret := &Operation{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Creates a new Backup in a given project and location.", + // "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/backups", + // "httpMethod": "POST", + // "id": "alloydb.projects.locations.backups.create", + // "parameterOrder": [ + // "parent" + // ], + // "parameters": { + // "backupId": { + // "description": "Required. ID of the requesting object.", + // "location": "query", + // "type": "string" + // }, + // "parent": { + // "description": "Required. Value for parent.", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+$", + // "required": true, + // "type": "string" + // }, + // "requestId": { + // "description": "Optional. An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. The server will guarantee that for at least 60 minutes since the first request. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", + // "location": "query", + // "type": "string" + // }, + // "validateOnly": { + // "description": "Optional. If set, the backend validates the request, but doesn't actually execute it.", + // "location": "query", + // "type": "boolean" + // } + // }, + // "path": "v1alpha/{+parent}/backups", + // "request": { + // "$ref": "Backup" + // }, + // "response": { + // "$ref": "Operation" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "alloydb.projects.locations.backups.delete": + +type ProjectsLocationsBackupsDeleteCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Delete: Deletes a single Backup. +// +// - name: Name of the resource. For the required format, see the +// comment on the Backup.name field. +func (r *ProjectsLocationsBackupsService) Delete(name string) *ProjectsLocationsBackupsDeleteCall { + c := &ProjectsLocationsBackupsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + return c +} + +// Etag sets the optional parameter "etag": The current etag of the +// Backup. If an etag is provided and does not match the current etag of +// the Backup, deletion will be blocked and an ABORTED error will be +// returned. +func (c *ProjectsLocationsBackupsDeleteCall) Etag(etag string) *ProjectsLocationsBackupsDeleteCall { + c.urlParams_.Set("etag", etag) + return c +} + +// RequestId sets the optional parameter "requestId": An optional +// request ID to identify requests. Specify a unique request ID so that +// if you must retry your request, the server will know to ignore the +// request if it has already been completed. The server will guarantee +// that for at least 60 minutes after the first request. For example, +// consider a situation where you make an initial request and the +// request times out. If you make the request again with the same +// request ID, the server can check if original operation with the same +// request ID was received, and if so, will ignore the second request. +// This prevents clients from accidentally creating duplicate +// commitments. The request ID must be a valid UUID with the exception +// that zero UUID is not supported +// (00000000-0000-0000-0000-000000000000). +func (c *ProjectsLocationsBackupsDeleteCall) RequestId(requestId string) *ProjectsLocationsBackupsDeleteCall { + c.urlParams_.Set("requestId", requestId) + return c +} + +// ValidateOnly sets the optional parameter "validateOnly": If set, the +// backend validates the request, but doesn't actually execute it. +func (c *ProjectsLocationsBackupsDeleteCall) ValidateOnly(validateOnly bool) *ProjectsLocationsBackupsDeleteCall { + 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 *ProjectsLocationsBackupsDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsBackupsDeleteCall { + 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 *ProjectsLocationsBackupsDeleteCall) Context(ctx context.Context) *ProjectsLocationsBackupsDeleteCall { + 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 *ProjectsLocationsBackupsDeleteCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsBackupsDeleteCall) 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, "v1alpha/{+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 "alloydb.projects.locations.backups.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 *ProjectsLocationsBackupsDeleteCall) Do(opts ...googleapi.CallOption) (*Operation, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, gensupport.WrapError(&googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + }) + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, gensupport.WrapError(err) + } + ret := &Operation{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Deletes a single Backup.", + // "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/backups/{backupsId}", + // "httpMethod": "DELETE", + // "id": "alloydb.projects.locations.backups.delete", + // "parameterOrder": [ + // "name" + // ], + // "parameters": { + // "etag": { + // "description": "Optional. The current etag of the Backup. If an etag is provided and does not match the current etag of the Backup, deletion will be blocked and an ABORTED error will be returned.", + // "location": "query", + // "type": "string" + // }, + // "name": { + // "description": "Required. Name of the resource. For the required format, see the comment on the Backup.name field.", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+/backups/[^/]+$", + // "required": true, + // "type": "string" + // }, + // "requestId": { + // "description": "Optional. An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. The server will guarantee that for at least 60 minutes after the first request. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", + // "location": "query", + // "type": "string" + // }, + // "validateOnly": { + // "description": "Optional. If set, the backend validates the request, but doesn't actually execute it.", + // "location": "query", + // "type": "boolean" + // } + // }, + // "path": "v1alpha/{+name}", + // "response": { + // "$ref": "Operation" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "alloydb.projects.locations.backups.get": + +type ProjectsLocationsBackupsGetCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// Get: Gets details of a single Backup. +// +// - name: Name of the resource. +func (r *ProjectsLocationsBackupsService) Get(name string) *ProjectsLocationsBackupsGetCall { + c := &ProjectsLocationsBackupsGetCall{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 *ProjectsLocationsBackupsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsBackupsGetCall { + 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 *ProjectsLocationsBackupsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsBackupsGetCall { + 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 *ProjectsLocationsBackupsGetCall) Context(ctx context.Context) *ProjectsLocationsBackupsGetCall { + 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 *ProjectsLocationsBackupsGetCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsBackupsGetCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) + } + var body io.Reader = nil + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+name}") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("GET", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "name": c.name, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "alloydb.projects.locations.backups.get" call. +// Exactly one of *Backup or error will be non-nil. Any non-2xx status +// code is an error. Response headers are in either +// *Backup.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 *ProjectsLocationsBackupsGetCall) Do(opts ...googleapi.CallOption) (*Backup, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, gensupport.WrapError(&googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + }) + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, gensupport.WrapError(err) + } + ret := &Backup{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Gets details of a single Backup.", + // "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/backups/{backupsId}", + // "httpMethod": "GET", + // "id": "alloydb.projects.locations.backups.get", + // "parameterOrder": [ + // "name" + // ], + // "parameters": { + // "name": { + // "description": "Required. Name of the resource", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+/backups/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1alpha/{+name}", + // "response": { + // "$ref": "Backup" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "alloydb.projects.locations.backups.list": + +type ProjectsLocationsBackupsListCall struct { + s *Service + parent string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// List: Lists Backups in a given project and location. +// +// - parent: Parent value for ListBackupsRequest. +func (r *ProjectsLocationsBackupsService) List(parent string) *ProjectsLocationsBackupsListCall { + c := &ProjectsLocationsBackupsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + return c +} + +// Filter sets the optional parameter "filter": Filtering results +func (c *ProjectsLocationsBackupsListCall) Filter(filter string) *ProjectsLocationsBackupsListCall { + c.urlParams_.Set("filter", filter) + return c +} + +// OrderBy sets the optional parameter "orderBy": Hint for how to order +// the results +func (c *ProjectsLocationsBackupsListCall) OrderBy(orderBy string) *ProjectsLocationsBackupsListCall { + c.urlParams_.Set("orderBy", orderBy) + return c +} + +// PageSize sets the optional parameter "pageSize": Requested page size. +// Server may return fewer items than requested. If unspecified, server +// will pick an appropriate default. +func (c *ProjectsLocationsBackupsListCall) PageSize(pageSize int64) *ProjectsLocationsBackupsListCall { + c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) + return c +} + +// PageToken sets the optional parameter "pageToken": A token +// identifying a page of results the server should return. +func (c *ProjectsLocationsBackupsListCall) PageToken(pageToken string) *ProjectsLocationsBackupsListCall { + 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 *ProjectsLocationsBackupsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsBackupsListCall { + 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 *ProjectsLocationsBackupsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsBackupsListCall { + 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 *ProjectsLocationsBackupsListCall) Context(ctx context.Context) *ProjectsLocationsBackupsListCall { + 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 *ProjectsLocationsBackupsListCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsBackupsListCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) + } + var body io.Reader = nil + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+parent}/backups") + 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 "alloydb.projects.locations.backups.list" call. +// Exactly one of *ListBackupsResponse or error will be non-nil. Any +// non-2xx status code is an error. Response headers are in either +// *ListBackupsResponse.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 *ProjectsLocationsBackupsListCall) Do(opts ...googleapi.CallOption) (*ListBackupsResponse, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, gensupport.WrapError(&googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + }) + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, gensupport.WrapError(err) + } + ret := &ListBackupsResponse{ + 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 Backups in a given project and location.", + // "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/backups", + // "httpMethod": "GET", + // "id": "alloydb.projects.locations.backups.list", + // "parameterOrder": [ + // "parent" + // ], + // "parameters": { + // "filter": { + // "description": "Filtering results", + // "location": "query", + // "type": "string" + // }, + // "orderBy": { + // "description": "Hint for how to order the results", + // "location": "query", + // "type": "string" + // }, + // "pageSize": { + // "description": "Requested page size. Server may return fewer items than requested. If unspecified, server will pick an appropriate default.", + // "format": "int32", + // "location": "query", + // "type": "integer" + // }, + // "pageToken": { + // "description": "A token identifying a page of results the server should return.", + // "location": "query", + // "type": "string" + // }, + // "parent": { + // "description": "Required. Parent value for ListBackupsRequest", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1alpha/{+parent}/backups", + // "response": { + // "$ref": "ListBackupsResponse" + // }, + // "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 *ProjectsLocationsBackupsListCall) Pages(ctx context.Context, f func(*ListBackupsResponse) 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 "alloydb.projects.locations.backups.patch": + +type ProjectsLocationsBackupsPatchCall struct { + s *Service + name string + backup *Backup + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Patch: Updates the parameters of a single Backup. +// +// - name: Output only. The name of the backup resource with the format: +// - projects/{project}/locations/{region}/backups/{backup_id} where +// the cluster and backup ID segments should satisfy the regex +// expression `[a-z]([a-z0-9-]{0,61}[a-z0-9])?`, e.g. 1-63 characters +// of lowercase letters, numbers, and dashes, starting with a letter, +// and ending with a letter or number. For more details see +// https://google.aip.dev/122. The prefix of the backup resource name +// is the name of the parent resource: * +// projects/{project}/locations/{region}. +func (r *ProjectsLocationsBackupsService) Patch(name string, backup *Backup) *ProjectsLocationsBackupsPatchCall { + c := &ProjectsLocationsBackupsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + c.backup = backup + return c +} + +// AllowMissing sets the optional parameter "allowMissing": If set to +// true, update succeeds even if instance is not found. In that case, a +// new backup is created and `update_mask` is ignored. +func (c *ProjectsLocationsBackupsPatchCall) AllowMissing(allowMissing bool) *ProjectsLocationsBackupsPatchCall { + c.urlParams_.Set("allowMissing", fmt.Sprint(allowMissing)) + return c +} + +// RequestId sets the optional parameter "requestId": An optional +// request ID to identify requests. Specify a unique request ID so that +// if you must retry your request, the server will know to ignore the +// request if it has already been completed. The server will guarantee +// that for at least 60 minutes since the first request. For example, +// consider a situation where you make an initial request and the +// request times out. If you make the request again with the same +// request ID, the server can check if original operation with the same +// request ID was received, and if so, will ignore the second request. +// This prevents clients from accidentally creating duplicate +// commitments. The request ID must be a valid UUID with the exception +// that zero UUID is not supported +// (00000000-0000-0000-0000-000000000000). +func (c *ProjectsLocationsBackupsPatchCall) RequestId(requestId string) *ProjectsLocationsBackupsPatchCall { + c.urlParams_.Set("requestId", requestId) + return c +} + +// UpdateMask sets the optional parameter "updateMask": Field mask is +// used to specify the fields to be overwritten in the Backup resource +// by the update. The fields specified in the update_mask are relative +// to the resource, not the full request. A field will be overwritten if +// it is in the mask. If the user does not provide a mask then all +// fields will be overwritten. +func (c *ProjectsLocationsBackupsPatchCall) UpdateMask(updateMask string) *ProjectsLocationsBackupsPatchCall { + c.urlParams_.Set("updateMask", updateMask) + return c +} + +// ValidateOnly sets the optional parameter "validateOnly": If set, the +// backend validates the request, but doesn't actually execute it. +func (c *ProjectsLocationsBackupsPatchCall) ValidateOnly(validateOnly bool) *ProjectsLocationsBackupsPatchCall { + 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 *ProjectsLocationsBackupsPatchCall) Fields(s ...googleapi.Field) *ProjectsLocationsBackupsPatchCall { + 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 *ProjectsLocationsBackupsPatchCall) Context(ctx context.Context) *ProjectsLocationsBackupsPatchCall { + 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 *ProjectsLocationsBackupsPatchCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsBackupsPatchCall) 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.backup) + if err != nil { + return nil, err + } + reqHeaders.Set("Content-Type", "application/json") + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+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 "alloydb.projects.locations.backups.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 *ProjectsLocationsBackupsPatchCall) Do(opts ...googleapi.CallOption) (*Operation, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, gensupport.WrapError(&googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + }) + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, gensupport.WrapError(err) + } + ret := &Operation{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Updates the parameters of a single Backup.", + // "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/backups/{backupsId}", + // "httpMethod": "PATCH", + // "id": "alloydb.projects.locations.backups.patch", + // "parameterOrder": [ + // "name" + // ], + // "parameters": { + // "allowMissing": { + // "description": "Optional. If set to true, update succeeds even if instance is not found. In that case, a new backup is created and `update_mask` is ignored.", + // "location": "query", + // "type": "boolean" + // }, + // "name": { + // "description": "Output only. The name of the backup resource with the format: * projects/{project}/locations/{region}/backups/{backup_id} where the cluster and backup ID segments should satisfy the regex expression `[a-z]([a-z0-9-]{0,61}[a-z0-9])?`, e.g. 1-63 characters of lowercase letters, numbers, and dashes, starting with a letter, and ending with a letter or number. For more details see https://google.aip.dev/122. The prefix of the backup resource name is the name of the parent resource: * projects/{project}/locations/{region}", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+/backups/[^/]+$", + // "required": true, + // "type": "string" + // }, + // "requestId": { + // "description": "Optional. An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. The server will guarantee that for at least 60 minutes since the first request. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", + // "location": "query", + // "type": "string" + // }, + // "updateMask": { + // "description": "Optional. Field mask is used to specify the fields to be overwritten in the Backup resource by the update. The fields specified in the update_mask are relative to the resource, not the full request. A field will be overwritten if it is in the mask. If the user does not provide a mask then all fields will be overwritten.", + // "format": "google-fieldmask", + // "location": "query", + // "type": "string" + // }, + // "validateOnly": { + // "description": "Optional. If set, the backend validates the request, but doesn't actually execute it.", + // "location": "query", + // "type": "boolean" + // } + // }, + // "path": "v1alpha/{+name}", + // "request": { + // "$ref": "Backup" + // }, + // "response": { + // "$ref": "Operation" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "alloydb.projects.locations.clusters.create": + +type ProjectsLocationsClustersCreateCall struct { + s *Service + parent string + cluster *Cluster + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Create: Creates a new Cluster in a given project and location. +// +// - parent: The location of the new cluster. For the required format, +// see the comment on the Cluster.name field. +func (r *ProjectsLocationsClustersService) Create(parent string, cluster *Cluster) *ProjectsLocationsClustersCreateCall { + c := &ProjectsLocationsClustersCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + c.cluster = cluster + return c +} + +// ClusterId sets the optional parameter "clusterId": Required. ID of +// the requesting object. +func (c *ProjectsLocationsClustersCreateCall) ClusterId(clusterId string) *ProjectsLocationsClustersCreateCall { + c.urlParams_.Set("clusterId", clusterId) + return c +} + +// RequestId sets the optional parameter "requestId": An optional +// request ID to identify requests. Specify a unique request ID so that +// if you must retry your request, the server will know to ignore the +// request if it has already been completed. The server will guarantee +// that for at least 60 minutes since the first request. For example, +// consider a situation where you make an initial request and the +// request times out. If you make the request again with the same +// request ID, the server can check if original operation with the same +// request ID was received, and if so, will ignore the second request. +// This prevents clients from accidentally creating duplicate +// commitments. The request ID must be a valid UUID with the exception +// that zero UUID is not supported +// (00000000-0000-0000-0000-000000000000). +func (c *ProjectsLocationsClustersCreateCall) RequestId(requestId string) *ProjectsLocationsClustersCreateCall { + c.urlParams_.Set("requestId", requestId) + return c +} + +// ValidateOnly sets the optional parameter "validateOnly": If set, +// performs request validation (e.g. permission checks and any other +// type of validation), but do not actually execute the create request. +func (c *ProjectsLocationsClustersCreateCall) ValidateOnly(validateOnly bool) *ProjectsLocationsClustersCreateCall { + 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 *ProjectsLocationsClustersCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsClustersCreateCall { + 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 *ProjectsLocationsClustersCreateCall) Context(ctx context.Context) *ProjectsLocationsClustersCreateCall { + 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 *ProjectsLocationsClustersCreateCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsClustersCreateCall) 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.cluster) + if err != nil { + return nil, err + } + reqHeaders.Set("Content-Type", "application/json") + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+parent}/clusters") + 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 "alloydb.projects.locations.clusters.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 *ProjectsLocationsClustersCreateCall) Do(opts ...googleapi.CallOption) (*Operation, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, gensupport.WrapError(&googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + }) + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, gensupport.WrapError(err) + } + ret := &Operation{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Creates a new Cluster in a given project and location.", + // "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/clusters", + // "httpMethod": "POST", + // "id": "alloydb.projects.locations.clusters.create", + // "parameterOrder": [ + // "parent" + // ], + // "parameters": { + // "clusterId": { + // "description": "Required. ID of the requesting object.", + // "location": "query", + // "type": "string" + // }, + // "parent": { + // "description": "Required. The location of the new cluster. For the required format, see the comment on the Cluster.name field.", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+$", + // "required": true, + // "type": "string" + // }, + // "requestId": { + // "description": "Optional. An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. The server will guarantee that for at least 60 minutes since the first request. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", + // "location": "query", + // "type": "string" + // }, + // "validateOnly": { + // "description": "Optional. If set, performs request validation (e.g. permission checks and any other type of validation), but do not actually execute the create request.", + // "location": "query", + // "type": "boolean" + // } + // }, + // "path": "v1alpha/{+parent}/clusters", + // "request": { + // "$ref": "Cluster" + // }, + // "response": { + // "$ref": "Operation" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "alloydb.projects.locations.clusters.createsecondary": + +type ProjectsLocationsClustersCreatesecondaryCall struct { + s *Service + parent string + cluster *Cluster + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Createsecondary: Creates a cluster of type SECONDARY in the given +// location using the primary cluster as the source. +// +// - parent: The location of the new cluster. For the required format, +// see the comment on the Cluster.name field. +func (r *ProjectsLocationsClustersService) Createsecondary(parent string, cluster *Cluster) *ProjectsLocationsClustersCreatesecondaryCall { + c := &ProjectsLocationsClustersCreatesecondaryCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + c.cluster = cluster + return c +} + +// ClusterId sets the optional parameter "clusterId": Required. ID of +// the requesting object (the secondary cluster). +func (c *ProjectsLocationsClustersCreatesecondaryCall) ClusterId(clusterId string) *ProjectsLocationsClustersCreatesecondaryCall { + c.urlParams_.Set("clusterId", clusterId) + return c +} + +// RequestId sets the optional parameter "requestId": An optional +// request ID to identify requests. Specify a unique request ID so that +// if you must retry your request, the server will know to ignore the +// request if it has already been completed. The server will guarantee +// that for at least 60 minutes since the first request. For example, +// consider a situation where you make an initial request and the +// request times out. If you make the request again with the same +// request ID, the server can check if original operation with the same +// request ID was received, and if so, will ignore the second request. +// This prevents clients from accidentally creating duplicate +// commitments. The request ID must be a valid UUID with the exception +// that zero UUID is not supported +// (00000000-0000-0000-0000-000000000000). +func (c *ProjectsLocationsClustersCreatesecondaryCall) RequestId(requestId string) *ProjectsLocationsClustersCreatesecondaryCall { + c.urlParams_.Set("requestId", requestId) + return c +} + +// ValidateOnly sets the optional parameter "validateOnly": If set, +// performs request validation (e.g. permission checks and any other +// type of validation), but do not actually execute the create request. +func (c *ProjectsLocationsClustersCreatesecondaryCall) ValidateOnly(validateOnly bool) *ProjectsLocationsClustersCreatesecondaryCall { + 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 *ProjectsLocationsClustersCreatesecondaryCall) Fields(s ...googleapi.Field) *ProjectsLocationsClustersCreatesecondaryCall { + 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 *ProjectsLocationsClustersCreatesecondaryCall) Context(ctx context.Context) *ProjectsLocationsClustersCreatesecondaryCall { + 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 *ProjectsLocationsClustersCreatesecondaryCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsClustersCreatesecondaryCall) 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.cluster) + if err != nil { + return nil, err + } + reqHeaders.Set("Content-Type", "application/json") + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+parent}/clusters:createsecondary") + 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 "alloydb.projects.locations.clusters.createsecondary" 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 *ProjectsLocationsClustersCreatesecondaryCall) Do(opts ...googleapi.CallOption) (*Operation, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, gensupport.WrapError(&googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + }) + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, gensupport.WrapError(err) + } + ret := &Operation{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Creates a cluster of type SECONDARY in the given location using the primary cluster as the source.", + // "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/clusters:createsecondary", + // "httpMethod": "POST", + // "id": "alloydb.projects.locations.clusters.createsecondary", + // "parameterOrder": [ + // "parent" + // ], + // "parameters": { + // "clusterId": { + // "description": "Required. ID of the requesting object (the secondary cluster).", + // "location": "query", + // "type": "string" + // }, + // "parent": { + // "description": "Required. The location of the new cluster. For the required format, see the comment on the Cluster.name field.", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+$", + // "required": true, + // "type": "string" + // }, + // "requestId": { + // "description": "Optional. An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. The server will guarantee that for at least 60 minutes since the first request. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", + // "location": "query", + // "type": "string" + // }, + // "validateOnly": { + // "description": "Optional. If set, performs request validation (e.g. permission checks and any other type of validation), but do not actually execute the create request.", + // "location": "query", + // "type": "boolean" + // } + // }, + // "path": "v1alpha/{+parent}/clusters:createsecondary", + // "request": { + // "$ref": "Cluster" + // }, + // "response": { + // "$ref": "Operation" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "alloydb.projects.locations.clusters.delete": + +type ProjectsLocationsClustersDeleteCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Delete: Deletes a single Cluster. +// +// - name: The name of the resource. For the required format, see the +// comment on the Cluster.name field. +func (r *ProjectsLocationsClustersService) Delete(name string) *ProjectsLocationsClustersDeleteCall { + c := &ProjectsLocationsClustersDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + return c +} + +// Etag sets the optional parameter "etag": The current etag of the +// Cluster. If an etag is provided and does not match the current etag +// of the Cluster, deletion will be blocked and an ABORTED error will be +// returned. +func (c *ProjectsLocationsClustersDeleteCall) Etag(etag string) *ProjectsLocationsClustersDeleteCall { + c.urlParams_.Set("etag", etag) + return c +} + +// Force sets the optional parameter "force": Whether to cascade delete +// child instances for given cluster. +func (c *ProjectsLocationsClustersDeleteCall) Force(force bool) *ProjectsLocationsClustersDeleteCall { + c.urlParams_.Set("force", fmt.Sprint(force)) + return c +} + +// RequestId sets the optional parameter "requestId": An optional +// request ID to identify requests. Specify a unique request ID so that +// if you must retry your request, the server will know to ignore the +// request if it has already been completed. The server will guarantee +// that for at least 60 minutes after the first request. For example, +// consider a situation where you make an initial request and the +// request times out. If you make the request again with the same +// request ID, the server can check if original operation with the same +// request ID was received, and if so, will ignore the second request. +// This prevents clients from accidentally creating duplicate +// commitments. The request ID must be a valid UUID with the exception +// that zero UUID is not supported +// (00000000-0000-0000-0000-000000000000). +func (c *ProjectsLocationsClustersDeleteCall) RequestId(requestId string) *ProjectsLocationsClustersDeleteCall { + c.urlParams_.Set("requestId", requestId) + return c +} + +// ValidateOnly sets the optional parameter "validateOnly": If set, +// performs request validation (e.g. permission checks and any other +// type of validation), but do not actually execute the delete. +func (c *ProjectsLocationsClustersDeleteCall) ValidateOnly(validateOnly bool) *ProjectsLocationsClustersDeleteCall { + 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 *ProjectsLocationsClustersDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsClustersDeleteCall { + 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 *ProjectsLocationsClustersDeleteCall) Context(ctx context.Context) *ProjectsLocationsClustersDeleteCall { + 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 *ProjectsLocationsClustersDeleteCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsClustersDeleteCall) 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, "v1alpha/{+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 "alloydb.projects.locations.clusters.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 *ProjectsLocationsClustersDeleteCall) Do(opts ...googleapi.CallOption) (*Operation, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, gensupport.WrapError(&googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + }) + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, gensupport.WrapError(err) + } + ret := &Operation{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Deletes a single Cluster.", + // "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/clusters/{clustersId}", + // "httpMethod": "DELETE", + // "id": "alloydb.projects.locations.clusters.delete", + // "parameterOrder": [ + // "name" + // ], + // "parameters": { + // "etag": { + // "description": "Optional. The current etag of the Cluster. If an etag is provided and does not match the current etag of the Cluster, deletion will be blocked and an ABORTED error will be returned.", + // "location": "query", + // "type": "string" + // }, + // "force": { + // "description": "Optional. Whether to cascade delete child instances for given cluster.", + // "location": "query", + // "type": "boolean" + // }, + // "name": { + // "description": "Required. The name of the resource. For the required format, see the comment on the Cluster.name field.", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+/clusters/[^/]+$", + // "required": true, + // "type": "string" + // }, + // "requestId": { + // "description": "Optional. An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. The server will guarantee that for at least 60 minutes after the first request. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", + // "location": "query", + // "type": "string" + // }, + // "validateOnly": { + // "description": "Optional. If set, performs request validation (e.g. permission checks and any other type of validation), but do not actually execute the delete.", + // "location": "query", + // "type": "boolean" + // } + // }, + // "path": "v1alpha/{+name}", + // "response": { + // "$ref": "Operation" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "alloydb.projects.locations.clusters.generateClientCertificate": + +type ProjectsLocationsClustersGenerateClientCertificateCall struct { + s *Service + parent string + generateclientcertificaterequest *GenerateClientCertificateRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// GenerateClientCertificate: Generate a client certificate signed by a +// Cluster CA. The sole purpose of this endpoint is to support AlloyDB +// connectors and the Auth Proxy client. The endpoint's behavior is +// subject to change without notice, so do not rely on its behavior +// remaining constant. Future changes will not break AlloyDB connectors +// or the Auth Proxy client. +// +// - parent: The name of the parent resource. The required format is: * +// projects/{project}/locations/{location}/clusters/{cluster}. +func (r *ProjectsLocationsClustersService) GenerateClientCertificate(parent string, generateclientcertificaterequest *GenerateClientCertificateRequest) *ProjectsLocationsClustersGenerateClientCertificateCall { + c := &ProjectsLocationsClustersGenerateClientCertificateCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + c.generateclientcertificaterequest = generateclientcertificaterequest + 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 *ProjectsLocationsClustersGenerateClientCertificateCall) Fields(s ...googleapi.Field) *ProjectsLocationsClustersGenerateClientCertificateCall { + 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 *ProjectsLocationsClustersGenerateClientCertificateCall) Context(ctx context.Context) *ProjectsLocationsClustersGenerateClientCertificateCall { + 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 *ProjectsLocationsClustersGenerateClientCertificateCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsClustersGenerateClientCertificateCall) 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.generateclientcertificaterequest) + if err != nil { + return nil, err + } + reqHeaders.Set("Content-Type", "application/json") + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+parent}:generateClientCertificate") + 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 "alloydb.projects.locations.clusters.generateClientCertificate" call. +// Exactly one of *GenerateClientCertificateResponse or error will be +// non-nil. Any non-2xx status code is an error. Response headers are in +// either *GenerateClientCertificateResponse.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 *ProjectsLocationsClustersGenerateClientCertificateCall) Do(opts ...googleapi.CallOption) (*GenerateClientCertificateResponse, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, gensupport.WrapError(&googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + }) + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, gensupport.WrapError(err) + } + ret := &GenerateClientCertificateResponse{ + 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": "Generate a client certificate signed by a Cluster CA. The sole purpose of this endpoint is to support AlloyDB connectors and the Auth Proxy client. The endpoint's behavior is subject to change without notice, so do not rely on its behavior remaining constant. Future changes will not break AlloyDB connectors or the Auth Proxy client.", + // "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/clusters/{clustersId}:generateClientCertificate", + // "httpMethod": "POST", + // "id": "alloydb.projects.locations.clusters.generateClientCertificate", + // "parameterOrder": [ + // "parent" + // ], + // "parameters": { + // "parent": { + // "description": "Required. The name of the parent resource. The required format is: * projects/{project}/locations/{location}/clusters/{cluster}", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+/clusters/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1alpha/{+parent}:generateClientCertificate", + // "request": { + // "$ref": "GenerateClientCertificateRequest" + // }, + // "response": { + // "$ref": "GenerateClientCertificateResponse" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "alloydb.projects.locations.clusters.get": + +type ProjectsLocationsClustersGetCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// Get: Gets details of a single Cluster. +// +// - name: The name of the resource. For the required format, see the +// comment on the Cluster.name field. +func (r *ProjectsLocationsClustersService) Get(name string) *ProjectsLocationsClustersGetCall { + c := &ProjectsLocationsClustersGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + return c +} + +// View sets the optional parameter "view": The view of the cluster to +// return. Returns all default fields if not set. +// +// Possible values: +// +// "CLUSTER_VIEW_UNSPECIFIED" - CLUSTER_VIEW_UNSPECIFIED Not +// +// specified, equivalent to BASIC. +// +// "CLUSTER_VIEW_BASIC" - BASIC server responses include all the +// +// relevant cluster details, excluding +// Cluster.ContinuousBackupInfo.EarliestRestorableTime and other +// view-specific fields. The default value. +// +// "CLUSTER_VIEW_CONTINUOUS_BACKUP" - CONTINUOUS_BACKUP response +// +// returns all the fields from BASIC plus the earliest restorable time +// if continuous backups are enabled. May increase latency. +func (c *ProjectsLocationsClustersGetCall) View(view string) *ProjectsLocationsClustersGetCall { + 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 *ProjectsLocationsClustersGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsClustersGetCall { + 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 *ProjectsLocationsClustersGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsClustersGetCall { + 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 *ProjectsLocationsClustersGetCall) Context(ctx context.Context) *ProjectsLocationsClustersGetCall { + 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 *ProjectsLocationsClustersGetCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsClustersGetCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) + } + var body io.Reader = nil + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+name}") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("GET", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "name": c.name, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "alloydb.projects.locations.clusters.get" call. +// Exactly one of *Cluster or error will be non-nil. Any non-2xx status +// code is an error. Response headers are in either +// *Cluster.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 *ProjectsLocationsClustersGetCall) Do(opts ...googleapi.CallOption) (*Cluster, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, gensupport.WrapError(&googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + }) + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, gensupport.WrapError(err) + } + ret := &Cluster{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Gets details of a single Cluster.", + // "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/clusters/{clustersId}", + // "httpMethod": "GET", + // "id": "alloydb.projects.locations.clusters.get", + // "parameterOrder": [ + // "name" + // ], + // "parameters": { + // "name": { + // "description": "Required. The name of the resource. For the required format, see the comment on the Cluster.name field.", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+/clusters/[^/]+$", + // "required": true, + // "type": "string" + // }, + // "view": { + // "description": "Optional. The view of the cluster to return. Returns all default fields if not set.", + // "enum": [ + // "CLUSTER_VIEW_UNSPECIFIED", + // "CLUSTER_VIEW_BASIC", + // "CLUSTER_VIEW_CONTINUOUS_BACKUP" + // ], + // "enumDescriptions": [ + // "CLUSTER_VIEW_UNSPECIFIED Not specified, equivalent to BASIC.", + // "BASIC server responses include all the relevant cluster details, excluding Cluster.ContinuousBackupInfo.EarliestRestorableTime and other view-specific fields. The default value.", + // "CONTINUOUS_BACKUP response returns all the fields from BASIC plus the earliest restorable time if continuous backups are enabled. May increase latency." + // ], + // "location": "query", + // "type": "string" + // } + // }, + // "path": "v1alpha/{+name}", + // "response": { + // "$ref": "Cluster" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "alloydb.projects.locations.clusters.list": + +type ProjectsLocationsClustersListCall struct { + s *Service + parent string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// List: Lists Clusters in a given project and location. +// +// - parent: The name of the parent resource. For the required format, +// see the comment on the Cluster.name field. Additionally, you can +// perform an aggregated list operation by specifying a value with the +// following format: * projects/{project}/locations/-. +func (r *ProjectsLocationsClustersService) List(parent string) *ProjectsLocationsClustersListCall { + c := &ProjectsLocationsClustersListCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + return c +} + +// Filter sets the optional parameter "filter": Filtering results +func (c *ProjectsLocationsClustersListCall) Filter(filter string) *ProjectsLocationsClustersListCall { + c.urlParams_.Set("filter", filter) + return c +} + +// OrderBy sets the optional parameter "orderBy": Hint for how to order +// the results +func (c *ProjectsLocationsClustersListCall) OrderBy(orderBy string) *ProjectsLocationsClustersListCall { + c.urlParams_.Set("orderBy", orderBy) + return c +} + +// PageSize sets the optional parameter "pageSize": Requested page size. +// Server may return fewer items than requested. If unspecified, server +// will pick an appropriate default. +func (c *ProjectsLocationsClustersListCall) PageSize(pageSize int64) *ProjectsLocationsClustersListCall { + c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) + return c +} + +// PageToken sets the optional parameter "pageToken": A token +// identifying a page of results the server should return. +func (c *ProjectsLocationsClustersListCall) PageToken(pageToken string) *ProjectsLocationsClustersListCall { + 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 *ProjectsLocationsClustersListCall) Fields(s ...googleapi.Field) *ProjectsLocationsClustersListCall { + 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 *ProjectsLocationsClustersListCall) IfNoneMatch(entityTag string) *ProjectsLocationsClustersListCall { + 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 *ProjectsLocationsClustersListCall) Context(ctx context.Context) *ProjectsLocationsClustersListCall { + 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 *ProjectsLocationsClustersListCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsClustersListCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) + } + var body io.Reader = nil + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+parent}/clusters") + 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 "alloydb.projects.locations.clusters.list" call. +// Exactly one of *ListClustersResponse or error will be non-nil. Any +// non-2xx status code is an error. Response headers are in either +// *ListClustersResponse.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 *ProjectsLocationsClustersListCall) Do(opts ...googleapi.CallOption) (*ListClustersResponse, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, gensupport.WrapError(&googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + }) + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, gensupport.WrapError(err) + } + ret := &ListClustersResponse{ + 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 Clusters in a given project and location.", + // "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/clusters", + // "httpMethod": "GET", + // "id": "alloydb.projects.locations.clusters.list", + // "parameterOrder": [ + // "parent" + // ], + // "parameters": { + // "filter": { + // "description": "Optional. Filtering results", + // "location": "query", + // "type": "string" + // }, + // "orderBy": { + // "description": "Optional. Hint for how to order the results", + // "location": "query", + // "type": "string" + // }, + // "pageSize": { + // "description": "Optional. Requested page size. Server may return fewer items than requested. If unspecified, server will pick an appropriate default.", + // "format": "int32", + // "location": "query", + // "type": "integer" + // }, + // "pageToken": { + // "description": "A token identifying a page of results the server should return.", + // "location": "query", + // "type": "string" + // }, + // "parent": { + // "description": "Required. The name of the parent resource. For the required format, see the comment on the Cluster.name field. Additionally, you can perform an aggregated list operation by specifying a value with the following format: * projects/{project}/locations/-", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1alpha/{+parent}/clusters", + // "response": { + // "$ref": "ListClustersResponse" + // }, + // "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 *ProjectsLocationsClustersListCall) Pages(ctx context.Context, f func(*ListClustersResponse) 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 "alloydb.projects.locations.clusters.patch": + +type ProjectsLocationsClustersPatchCall struct { + s *Service + name string + cluster *Cluster + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Patch: Updates the parameters of a single Cluster. +// +// - name: Output only. The name of the cluster resource with the +// format: * +// projects/{project}/locations/{region}/clusters/{cluster_id} where +// the cluster ID segment should satisfy the regex expression +// `[a-z0-9-]+`. For more details see https://google.aip.dev/122. The +// prefix of the cluster resource name is the name of the parent +// resource: * projects/{project}/locations/{region}. +func (r *ProjectsLocationsClustersService) Patch(name string, cluster *Cluster) *ProjectsLocationsClustersPatchCall { + c := &ProjectsLocationsClustersPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + c.cluster = cluster + return c +} + +// AllowMissing sets the optional parameter "allowMissing": If set to +// true, update succeeds even if cluster is not found. In that case, a +// new cluster is created and `update_mask` is ignored. +func (c *ProjectsLocationsClustersPatchCall) AllowMissing(allowMissing bool) *ProjectsLocationsClustersPatchCall { + c.urlParams_.Set("allowMissing", fmt.Sprint(allowMissing)) + return c +} + +// RequestId sets the optional parameter "requestId": An optional +// request ID to identify requests. Specify a unique request ID so that +// if you must retry your request, the server will know to ignore the +// request if it has already been completed. The server will guarantee +// that for at least 60 minutes since the first request. For example, +// consider a situation where you make an initial request and the +// request times out. If you make the request again with the same +// request ID, the server can check if original operation with the same +// request ID was received, and if so, will ignore the second request. +// This prevents clients from accidentally creating duplicate +// commitments. The request ID must be a valid UUID with the exception +// that zero UUID is not supported +// (00000000-0000-0000-0000-000000000000). +func (c *ProjectsLocationsClustersPatchCall) RequestId(requestId string) *ProjectsLocationsClustersPatchCall { + c.urlParams_.Set("requestId", requestId) + return c +} + +// UpdateMask sets the optional parameter "updateMask": Field mask is +// used to specify the fields to be overwritten in the Cluster resource +// by the update. The fields specified in the update_mask are relative +// to the resource, not the full request. A field will be overwritten if +// it is in the mask. If the user does not provide a mask then all +// fields will be overwritten. +func (c *ProjectsLocationsClustersPatchCall) UpdateMask(updateMask string) *ProjectsLocationsClustersPatchCall { + c.urlParams_.Set("updateMask", updateMask) + return c +} + +// ValidateOnly sets the optional parameter "validateOnly": If set, +// performs request validation (e.g. permission checks and any other +// type of validation), but do not actually execute the update request. +func (c *ProjectsLocationsClustersPatchCall) ValidateOnly(validateOnly bool) *ProjectsLocationsClustersPatchCall { + 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 *ProjectsLocationsClustersPatchCall) Fields(s ...googleapi.Field) *ProjectsLocationsClustersPatchCall { + 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 *ProjectsLocationsClustersPatchCall) Context(ctx context.Context) *ProjectsLocationsClustersPatchCall { + 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 *ProjectsLocationsClustersPatchCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsClustersPatchCall) 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.cluster) + if err != nil { + return nil, err + } + reqHeaders.Set("Content-Type", "application/json") + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+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 "alloydb.projects.locations.clusters.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 *ProjectsLocationsClustersPatchCall) Do(opts ...googleapi.CallOption) (*Operation, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, gensupport.WrapError(&googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + }) + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, gensupport.WrapError(err) + } + ret := &Operation{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Updates the parameters of a single Cluster.", + // "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/clusters/{clustersId}", + // "httpMethod": "PATCH", + // "id": "alloydb.projects.locations.clusters.patch", + // "parameterOrder": [ + // "name" + // ], + // "parameters": { + // "allowMissing": { + // "description": "Optional. If set to true, update succeeds even if cluster is not found. In that case, a new cluster is created and `update_mask` is ignored.", + // "location": "query", + // "type": "boolean" + // }, + // "name": { + // "description": "Output only. The name of the cluster resource with the format: * projects/{project}/locations/{region}/clusters/{cluster_id} where the cluster ID segment should satisfy the regex expression `[a-z0-9-]+`. For more details see https://google.aip.dev/122. The prefix of the cluster resource name is the name of the parent resource: * projects/{project}/locations/{region}", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+/clusters/[^/]+$", + // "required": true, + // "type": "string" + // }, + // "requestId": { + // "description": "Optional. An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. The server will guarantee that for at least 60 minutes since the first request. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", + // "location": "query", + // "type": "string" + // }, + // "updateMask": { + // "description": "Optional. Field mask is used to specify the fields to be overwritten in the Cluster resource by the update. The fields specified in the update_mask are relative to the resource, not the full request. A field will be overwritten if it is in the mask. If the user does not provide a mask then all fields will be overwritten.", + // "format": "google-fieldmask", + // "location": "query", + // "type": "string" + // }, + // "validateOnly": { + // "description": "Optional. If set, performs request validation (e.g. permission checks and any other type of validation), but do not actually execute the update request.", + // "location": "query", + // "type": "boolean" + // } + // }, + // "path": "v1alpha/{+name}", + // "request": { + // "$ref": "Cluster" + // }, + // "response": { + // "$ref": "Operation" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "alloydb.projects.locations.clusters.promote": + +type ProjectsLocationsClustersPromoteCall struct { + s *Service + name string + promoteclusterrequest *PromoteClusterRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Promote: Promotes a SECONDARY cluster. This turns down replication +// from the PRIMARY cluster and promotes a secondary cluster into its +// own standalone cluster. Imperative only. +// +// - name: The name of the resource. For the required format, see the +// comment on the Cluster.name field. +func (r *ProjectsLocationsClustersService) Promote(name string, promoteclusterrequest *PromoteClusterRequest) *ProjectsLocationsClustersPromoteCall { + c := &ProjectsLocationsClustersPromoteCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + c.promoteclusterrequest = promoteclusterrequest + 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 *ProjectsLocationsClustersPromoteCall) Fields(s ...googleapi.Field) *ProjectsLocationsClustersPromoteCall { + 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 *ProjectsLocationsClustersPromoteCall) Context(ctx context.Context) *ProjectsLocationsClustersPromoteCall { + 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 *ProjectsLocationsClustersPromoteCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsClustersPromoteCall) 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.promoteclusterrequest) + if err != nil { + return nil, err + } + reqHeaders.Set("Content-Type", "application/json") + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+name}:promote") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("POST", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "name": c.name, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "alloydb.projects.locations.clusters.promote" 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 *ProjectsLocationsClustersPromoteCall) Do(opts ...googleapi.CallOption) (*Operation, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, gensupport.WrapError(&googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + }) + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, gensupport.WrapError(err) + } + ret := &Operation{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Promotes a SECONDARY cluster. This turns down replication from the PRIMARY cluster and promotes a secondary cluster into its own standalone cluster. Imperative only.", + // "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/clusters/{clustersId}:promote", + // "httpMethod": "POST", + // "id": "alloydb.projects.locations.clusters.promote", + // "parameterOrder": [ + // "name" + // ], + // "parameters": { + // "name": { + // "description": "Required. The name of the resource. For the required format, see the comment on the Cluster.name field", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+/clusters/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1alpha/{+name}:promote", + // "request": { + // "$ref": "PromoteClusterRequest" + // }, + // "response": { + // "$ref": "Operation" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "alloydb.projects.locations.clusters.restore": + +type ProjectsLocationsClustersRestoreCall struct { + s *Service + parent string + restoreclusterrequest *RestoreClusterRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Restore: Creates a new Cluster in a given project and location, with +// a volume restored from the provided source, either a backup ID or a +// point-in-time and a source cluster. +// +// - parent: The name of the parent resource. For the required format, +// see the comment on the Cluster.name field. +func (r *ProjectsLocationsClustersService) Restore(parent string, restoreclusterrequest *RestoreClusterRequest) *ProjectsLocationsClustersRestoreCall { + c := &ProjectsLocationsClustersRestoreCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + c.restoreclusterrequest = restoreclusterrequest + 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 *ProjectsLocationsClustersRestoreCall) Fields(s ...googleapi.Field) *ProjectsLocationsClustersRestoreCall { + 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 *ProjectsLocationsClustersRestoreCall) Context(ctx context.Context) *ProjectsLocationsClustersRestoreCall { + 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 *ProjectsLocationsClustersRestoreCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsClustersRestoreCall) 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.restoreclusterrequest) + if err != nil { + return nil, err + } + reqHeaders.Set("Content-Type", "application/json") + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+parent}/clusters:restore") + 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 "alloydb.projects.locations.clusters.restore" 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 *ProjectsLocationsClustersRestoreCall) Do(opts ...googleapi.CallOption) (*Operation, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, gensupport.WrapError(&googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + }) + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, gensupport.WrapError(err) + } + ret := &Operation{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Creates a new Cluster in a given project and location, with a volume restored from the provided source, either a backup ID or a point-in-time and a source cluster.", + // "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/clusters:restore", + // "httpMethod": "POST", + // "id": "alloydb.projects.locations.clusters.restore", + // "parameterOrder": [ + // "parent" + // ], + // "parameters": { + // "parent": { + // "description": "Required. The name of the parent resource. For the required format, see the comment on the Cluster.name field.", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1alpha/{+parent}/clusters:restore", + // "request": { + // "$ref": "RestoreClusterRequest" + // }, + // "response": { + // "$ref": "Operation" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "alloydb.projects.locations.clusters.instances.create": + +type ProjectsLocationsClustersInstancesCreateCall struct { + s *Service + parent string + instance *Instance + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Create: Creates a new Instance in a given project and location. +// +// - parent: The name of the parent resource. For the required format, +// see the comment on the Instance.name field. +func (r *ProjectsLocationsClustersInstancesService) Create(parent string, instance *Instance) *ProjectsLocationsClustersInstancesCreateCall { + c := &ProjectsLocationsClustersInstancesCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + c.instance = instance + return c +} + +// InstanceId sets the optional parameter "instanceId": Required. ID of +// the requesting object. +func (c *ProjectsLocationsClustersInstancesCreateCall) InstanceId(instanceId string) *ProjectsLocationsClustersInstancesCreateCall { + c.urlParams_.Set("instanceId", instanceId) + return c +} + +// RequestId sets the optional parameter "requestId": An optional +// request ID to identify requests. Specify a unique request ID so that +// if you must retry your request, the server will know to ignore the +// request if it has already been completed. The server will guarantee +// that for at least 60 minutes since the first request. For example, +// consider a situation where you make an initial request and the +// request times out. If you make the request again with the same +// request ID, the server can check if original operation with the same +// request ID was received, and if so, will ignore the second request. +// This prevents clients from accidentally creating duplicate +// commitments. The request ID must be a valid UUID with the exception +// that zero UUID is not supported +// (00000000-0000-0000-0000-000000000000). +func (c *ProjectsLocationsClustersInstancesCreateCall) RequestId(requestId string) *ProjectsLocationsClustersInstancesCreateCall { + c.urlParams_.Set("requestId", requestId) + return c +} + +// ValidateOnly sets the optional parameter "validateOnly": If set, +// performs request validation (e.g. permission checks and any other +// type of validation), but do not actually execute the create request. +func (c *ProjectsLocationsClustersInstancesCreateCall) ValidateOnly(validateOnly bool) *ProjectsLocationsClustersInstancesCreateCall { + 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 *ProjectsLocationsClustersInstancesCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsClustersInstancesCreateCall { + 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 *ProjectsLocationsClustersInstancesCreateCall) Context(ctx context.Context) *ProjectsLocationsClustersInstancesCreateCall { + 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 *ProjectsLocationsClustersInstancesCreateCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsClustersInstancesCreateCall) 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.instance) + if err != nil { + return nil, err + } + reqHeaders.Set("Content-Type", "application/json") + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+parent}/instances") + 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 "alloydb.projects.locations.clusters.instances.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 *ProjectsLocationsClustersInstancesCreateCall) Do(opts ...googleapi.CallOption) (*Operation, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, gensupport.WrapError(&googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + }) + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, gensupport.WrapError(err) + } + ret := &Operation{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Creates a new Instance in a given project and location.", + // "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/clusters/{clustersId}/instances", + // "httpMethod": "POST", + // "id": "alloydb.projects.locations.clusters.instances.create", + // "parameterOrder": [ + // "parent" + // ], + // "parameters": { + // "instanceId": { + // "description": "Required. ID of the requesting object.", + // "location": "query", + // "type": "string" + // }, + // "parent": { + // "description": "Required. The name of the parent resource. For the required format, see the comment on the Instance.name field.", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+/clusters/[^/]+$", + // "required": true, + // "type": "string" + // }, + // "requestId": { + // "description": "Optional. An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. The server will guarantee that for at least 60 minutes since the first request. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", + // "location": "query", + // "type": "string" + // }, + // "validateOnly": { + // "description": "Optional. If set, performs request validation (e.g. permission checks and any other type of validation), but do not actually execute the create request.", + // "location": "query", + // "type": "boolean" + // } + // }, + // "path": "v1alpha/{+parent}/instances", + // "request": { + // "$ref": "Instance" + // }, + // "response": { + // "$ref": "Operation" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "alloydb.projects.locations.clusters.instances.createsecondary": + +type ProjectsLocationsClustersInstancesCreatesecondaryCall struct { + s *Service + parent string + instance *Instance + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Createsecondary: Creates a new SECONDARY Instance in a given project +// and location. +// +// - parent: The name of the parent resource. For the required format, +// see the comment on the Instance.name field. +func (r *ProjectsLocationsClustersInstancesService) Createsecondary(parent string, instance *Instance) *ProjectsLocationsClustersInstancesCreatesecondaryCall { + c := &ProjectsLocationsClustersInstancesCreatesecondaryCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + c.instance = instance + return c +} + +// InstanceId sets the optional parameter "instanceId": Required. ID of +// the requesting object. +func (c *ProjectsLocationsClustersInstancesCreatesecondaryCall) InstanceId(instanceId string) *ProjectsLocationsClustersInstancesCreatesecondaryCall { + c.urlParams_.Set("instanceId", instanceId) + return c +} + +// RequestId sets the optional parameter "requestId": An optional +// request ID to identify requests. Specify a unique request ID so that +// if you must retry your request, the server will know to ignore the +// request if it has already been completed. The server will guarantee +// that for at least 60 minutes since the first request. For example, +// consider a situation where you make an initial request and the +// request times out. If you make the request again with the same +// request ID, the server can check if original operation with the same +// request ID was received, and if so, will ignore the second request. +// This prevents clients from accidentally creating duplicate +// commitments. The request ID must be a valid UUID with the exception +// that zero UUID is not supported +// (00000000-0000-0000-0000-000000000000). +func (c *ProjectsLocationsClustersInstancesCreatesecondaryCall) RequestId(requestId string) *ProjectsLocationsClustersInstancesCreatesecondaryCall { + c.urlParams_.Set("requestId", requestId) + return c +} + +// ValidateOnly sets the optional parameter "validateOnly": If set, +// performs request validation (e.g. permission checks and any other +// type of validation), but do not actually execute the create request. +func (c *ProjectsLocationsClustersInstancesCreatesecondaryCall) ValidateOnly(validateOnly bool) *ProjectsLocationsClustersInstancesCreatesecondaryCall { + 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 *ProjectsLocationsClustersInstancesCreatesecondaryCall) Fields(s ...googleapi.Field) *ProjectsLocationsClustersInstancesCreatesecondaryCall { + 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 *ProjectsLocationsClustersInstancesCreatesecondaryCall) Context(ctx context.Context) *ProjectsLocationsClustersInstancesCreatesecondaryCall { + 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 *ProjectsLocationsClustersInstancesCreatesecondaryCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsClustersInstancesCreatesecondaryCall) 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.instance) + if err != nil { + return nil, err + } + reqHeaders.Set("Content-Type", "application/json") + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+parent}/instances:createsecondary") + 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 "alloydb.projects.locations.clusters.instances.createsecondary" 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 *ProjectsLocationsClustersInstancesCreatesecondaryCall) Do(opts ...googleapi.CallOption) (*Operation, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, gensupport.WrapError(&googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + }) + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, gensupport.WrapError(err) + } + ret := &Operation{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Creates a new SECONDARY Instance in a given project and location.", + // "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/clusters/{clustersId}/instances:createsecondary", + // "httpMethod": "POST", + // "id": "alloydb.projects.locations.clusters.instances.createsecondary", + // "parameterOrder": [ + // "parent" + // ], + // "parameters": { + // "instanceId": { + // "description": "Required. ID of the requesting object.", + // "location": "query", + // "type": "string" + // }, + // "parent": { + // "description": "Required. The name of the parent resource. For the required format, see the comment on the Instance.name field.", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+/clusters/[^/]+$", + // "required": true, + // "type": "string" + // }, + // "requestId": { + // "description": "Optional. An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. The server will guarantee that for at least 60 minutes since the first request. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", + // "location": "query", + // "type": "string" + // }, + // "validateOnly": { + // "description": "Optional. If set, performs request validation (e.g. permission checks and any other type of validation), but do not actually execute the create request.", + // "location": "query", + // "type": "boolean" + // } + // }, + // "path": "v1alpha/{+parent}/instances:createsecondary", + // "request": { + // "$ref": "Instance" + // }, + // "response": { + // "$ref": "Operation" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "alloydb.projects.locations.clusters.instances.delete": + +type ProjectsLocationsClustersInstancesDeleteCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Delete: Deletes a single Instance. +// +// - name: The name of the resource. For the required format, see the +// comment on the Instance.name field. +func (r *ProjectsLocationsClustersInstancesService) Delete(name string) *ProjectsLocationsClustersInstancesDeleteCall { + c := &ProjectsLocationsClustersInstancesDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + return c +} + +// Etag sets the optional parameter "etag": The current etag of the +// Instance. If an etag is provided and does not match the current etag +// of the Instance, deletion will be blocked and an ABORTED error will +// be returned. +func (c *ProjectsLocationsClustersInstancesDeleteCall) Etag(etag string) *ProjectsLocationsClustersInstancesDeleteCall { + c.urlParams_.Set("etag", etag) + return c +} + +// RequestId sets the optional parameter "requestId": An optional +// request ID to identify requests. Specify a unique request ID so that +// if you must retry your request, the server will know to ignore the +// request if it has already been completed. The server will guarantee +// that for at least 60 minutes after the first request. For example, +// consider a situation where you make an initial request and the +// request times out. If you make the request again with the same +// request ID, the server can check if original operation with the same +// request ID was received, and if so, will ignore the second request. +// This prevents clients from accidentally creating duplicate +// commitments. The request ID must be a valid UUID with the exception +// that zero UUID is not supported +// (00000000-0000-0000-0000-000000000000). +func (c *ProjectsLocationsClustersInstancesDeleteCall) RequestId(requestId string) *ProjectsLocationsClustersInstancesDeleteCall { + c.urlParams_.Set("requestId", requestId) + return c +} + +// ValidateOnly sets the optional parameter "validateOnly": If set, +// performs request validation (e.g. permission checks and any other +// type of validation), but do not actually execute the delete. +func (c *ProjectsLocationsClustersInstancesDeleteCall) ValidateOnly(validateOnly bool) *ProjectsLocationsClustersInstancesDeleteCall { + 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 *ProjectsLocationsClustersInstancesDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsClustersInstancesDeleteCall { + 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 *ProjectsLocationsClustersInstancesDeleteCall) Context(ctx context.Context) *ProjectsLocationsClustersInstancesDeleteCall { + 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 *ProjectsLocationsClustersInstancesDeleteCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsClustersInstancesDeleteCall) 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, "v1alpha/{+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 "alloydb.projects.locations.clusters.instances.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 *ProjectsLocationsClustersInstancesDeleteCall) Do(opts ...googleapi.CallOption) (*Operation, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, gensupport.WrapError(&googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + }) + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, gensupport.WrapError(err) + } + ret := &Operation{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Deletes a single Instance.", + // "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/clusters/{clustersId}/instances/{instancesId}", + // "httpMethod": "DELETE", + // "id": "alloydb.projects.locations.clusters.instances.delete", + // "parameterOrder": [ + // "name" + // ], + // "parameters": { + // "etag": { + // "description": "Optional. The current etag of the Instance. If an etag is provided and does not match the current etag of the Instance, deletion will be blocked and an ABORTED error will be returned.", + // "location": "query", + // "type": "string" + // }, + // "name": { + // "description": "Required. The name of the resource. For the required format, see the comment on the Instance.name field.", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+/clusters/[^/]+/instances/[^/]+$", + // "required": true, + // "type": "string" + // }, + // "requestId": { + // "description": "Optional. An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. The server will guarantee that for at least 60 minutes after the first request. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", + // "location": "query", + // "type": "string" + // }, + // "validateOnly": { + // "description": "Optional. If set, performs request validation (e.g. permission checks and any other type of validation), but do not actually execute the delete.", + // "location": "query", + // "type": "boolean" + // } + // }, + // "path": "v1alpha/{+name}", + // "response": { + // "$ref": "Operation" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "alloydb.projects.locations.clusters.instances.failover": + +type ProjectsLocationsClustersInstancesFailoverCall struct { + s *Service + name string + failoverinstancerequest *FailoverInstanceRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Failover: Forces a Failover for a highly available instance. Failover +// promotes the HA standby instance as the new primary. Imperative only. +// +// - name: The name of the resource. For the required format, see the +// comment on the Instance.name field. +func (r *ProjectsLocationsClustersInstancesService) Failover(name string, failoverinstancerequest *FailoverInstanceRequest) *ProjectsLocationsClustersInstancesFailoverCall { + c := &ProjectsLocationsClustersInstancesFailoverCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + c.failoverinstancerequest = failoverinstancerequest + 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 *ProjectsLocationsClustersInstancesFailoverCall) Fields(s ...googleapi.Field) *ProjectsLocationsClustersInstancesFailoverCall { + 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 *ProjectsLocationsClustersInstancesFailoverCall) Context(ctx context.Context) *ProjectsLocationsClustersInstancesFailoverCall { + 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 *ProjectsLocationsClustersInstancesFailoverCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsClustersInstancesFailoverCall) 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.failoverinstancerequest) + if err != nil { + return nil, err + } + reqHeaders.Set("Content-Type", "application/json") + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+name}:failover") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("POST", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "name": c.name, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "alloydb.projects.locations.clusters.instances.failover" 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 *ProjectsLocationsClustersInstancesFailoverCall) Do(opts ...googleapi.CallOption) (*Operation, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, gensupport.WrapError(&googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + }) + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, gensupport.WrapError(err) + } + ret := &Operation{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Forces a Failover for a highly available instance. Failover promotes the HA standby instance as the new primary. Imperative only.", + // "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/clusters/{clustersId}/instances/{instancesId}:failover", + // "httpMethod": "POST", + // "id": "alloydb.projects.locations.clusters.instances.failover", + // "parameterOrder": [ + // "name" + // ], + // "parameters": { + // "name": { + // "description": "Required. The name of the resource. For the required format, see the comment on the Instance.name field.", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+/clusters/[^/]+/instances/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1alpha/{+name}:failover", + // "request": { + // "$ref": "FailoverInstanceRequest" + // }, + // "response": { + // "$ref": "Operation" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "alloydb.projects.locations.clusters.instances.get": + +type ProjectsLocationsClustersInstancesGetCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// Get: Gets details of a single Instance. +// +// - name: The name of the resource. For the required format, see the +// comment on the Instance.name field. +func (r *ProjectsLocationsClustersInstancesService) Get(name string) *ProjectsLocationsClustersInstancesGetCall { + c := &ProjectsLocationsClustersInstancesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + return c +} + +// View sets the optional parameter "view": The view of the instance to +// return. +// +// Possible values: +// +// "INSTANCE_VIEW_UNSPECIFIED" - INSTANCE_VIEW_UNSPECIFIED Not +// +// specified, equivalent to BASIC. +// +// "INSTANCE_VIEW_BASIC" - BASIC server responses for a primary or +// +// read instance include all the relevant instance details, excluding +// the details of each node in the instance. The default value. +// +// "INSTANCE_VIEW_FULL" - FULL response is equivalent to BASIC for +// +// primary instance (for now). For read pool instance, this includes +// details of each node in the pool. +func (c *ProjectsLocationsClustersInstancesGetCall) View(view string) *ProjectsLocationsClustersInstancesGetCall { + 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 *ProjectsLocationsClustersInstancesGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsClustersInstancesGetCall { + 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 *ProjectsLocationsClustersInstancesGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsClustersInstancesGetCall { + 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 *ProjectsLocationsClustersInstancesGetCall) Context(ctx context.Context) *ProjectsLocationsClustersInstancesGetCall { + 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 *ProjectsLocationsClustersInstancesGetCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsClustersInstancesGetCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) + } + var body io.Reader = nil + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+name}") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("GET", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "name": c.name, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "alloydb.projects.locations.clusters.instances.get" call. +// Exactly one of *Instance or error will be non-nil. Any non-2xx status +// code is an error. Response headers are in either +// *Instance.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 *ProjectsLocationsClustersInstancesGetCall) Do(opts ...googleapi.CallOption) (*Instance, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, gensupport.WrapError(&googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + }) + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, gensupport.WrapError(err) + } + ret := &Instance{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Gets details of a single Instance.", + // "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/clusters/{clustersId}/instances/{instancesId}", + // "httpMethod": "GET", + // "id": "alloydb.projects.locations.clusters.instances.get", + // "parameterOrder": [ + // "name" + // ], + // "parameters": { + // "name": { + // "description": "Required. The name of the resource. For the required format, see the comment on the Instance.name field.", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+/clusters/[^/]+/instances/[^/]+$", + // "required": true, + // "type": "string" + // }, + // "view": { + // "description": "The view of the instance to return.", + // "enum": [ + // "INSTANCE_VIEW_UNSPECIFIED", + // "INSTANCE_VIEW_BASIC", + // "INSTANCE_VIEW_FULL" + // ], + // "enumDescriptions": [ + // "INSTANCE_VIEW_UNSPECIFIED Not specified, equivalent to BASIC.", + // "BASIC server responses for a primary or read instance include all the relevant instance details, excluding the details of each node in the instance. The default value.", + // "FULL response is equivalent to BASIC for primary instance (for now). For read pool instance, this includes details of each node in the pool." + // ], + // "location": "query", + // "type": "string" + // } + // }, + // "path": "v1alpha/{+name}", + // "response": { + // "$ref": "Instance" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "alloydb.projects.locations.clusters.instances.getConnectionInfo": + +type ProjectsLocationsClustersInstancesGetConnectionInfoCall struct { + s *Service + parent string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// GetConnectionInfo: Get instance metadata used for a connection. +// +// - parent: The name of the parent resource. The required format is: +// projects/{project}/locations/{location}/clusters/{cluster}/instances +// /{instance}. +func (r *ProjectsLocationsClustersInstancesService) GetConnectionInfo(parent string) *ProjectsLocationsClustersInstancesGetConnectionInfoCall { + c := &ProjectsLocationsClustersInstancesGetConnectionInfoCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + return c +} + +// RequestId sets the optional parameter "requestId": An optional +// request ID to identify requests. Specify a unique request ID so that +// if you must retry your request, the server will know to ignore the +// request if it has already been completed. The server will guarantee +// that for at least 60 minutes after the first request. For example, +// consider a situation where you make an initial request and the +// request times out. If you make the request again with the same +// request ID, the server can check if original operation with the same +// request ID was received, and if so, will ignore the second request. +// This prevents clients from accidentally creating duplicate +// commitments. The request ID must be a valid UUID with the exception +// that zero UUID is not supported +// (00000000-0000-0000-0000-000000000000). +func (c *ProjectsLocationsClustersInstancesGetConnectionInfoCall) RequestId(requestId string) *ProjectsLocationsClustersInstancesGetConnectionInfoCall { + c.urlParams_.Set("requestId", requestId) + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *ProjectsLocationsClustersInstancesGetConnectionInfoCall) Fields(s ...googleapi.Field) *ProjectsLocationsClustersInstancesGetConnectionInfoCall { + 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 *ProjectsLocationsClustersInstancesGetConnectionInfoCall) IfNoneMatch(entityTag string) *ProjectsLocationsClustersInstancesGetConnectionInfoCall { + 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 *ProjectsLocationsClustersInstancesGetConnectionInfoCall) Context(ctx context.Context) *ProjectsLocationsClustersInstancesGetConnectionInfoCall { + 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 *ProjectsLocationsClustersInstancesGetConnectionInfoCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsClustersInstancesGetConnectionInfoCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) + } + var body io.Reader = nil + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+parent}/connectionInfo") + 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 "alloydb.projects.locations.clusters.instances.getConnectionInfo" call. +// Exactly one of *ConnectionInfo or error will be non-nil. Any non-2xx +// status code is an error. Response headers are in either +// *ConnectionInfo.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 *ProjectsLocationsClustersInstancesGetConnectionInfoCall) Do(opts ...googleapi.CallOption) (*ConnectionInfo, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, gensupport.WrapError(&googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + }) + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, gensupport.WrapError(err) + } + ret := &ConnectionInfo{ + 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 instance metadata used for a connection.", + // "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/clusters/{clustersId}/instances/{instancesId}/connectionInfo", + // "httpMethod": "GET", + // "id": "alloydb.projects.locations.clusters.instances.getConnectionInfo", + // "parameterOrder": [ + // "parent" + // ], + // "parameters": { + // "parent": { + // "description": "Required. The name of the parent resource. The required format is: projects/{project}/locations/{location}/clusters/{cluster}/instances/{instance}", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+/clusters/[^/]+/instances/[^/]+$", + // "required": true, + // "type": "string" + // }, + // "requestId": { + // "description": "Optional. An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. The server will guarantee that for at least 60 minutes after the first request. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", + // "location": "query", + // "type": "string" + // } + // }, + // "path": "v1alpha/{+parent}/connectionInfo", + // "response": { + // "$ref": "ConnectionInfo" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "alloydb.projects.locations.clusters.instances.injectFault": + +type ProjectsLocationsClustersInstancesInjectFaultCall struct { + s *Service + name string + injectfaultrequest *InjectFaultRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// InjectFault: Injects fault in an instance. Imperative only. +// +// - name: The name of the resource. For the required format, see the +// comment on the Instance.name field. +func (r *ProjectsLocationsClustersInstancesService) InjectFault(name string, injectfaultrequest *InjectFaultRequest) *ProjectsLocationsClustersInstancesInjectFaultCall { + c := &ProjectsLocationsClustersInstancesInjectFaultCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + c.injectfaultrequest = injectfaultrequest + 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 *ProjectsLocationsClustersInstancesInjectFaultCall) Fields(s ...googleapi.Field) *ProjectsLocationsClustersInstancesInjectFaultCall { + 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 *ProjectsLocationsClustersInstancesInjectFaultCall) Context(ctx context.Context) *ProjectsLocationsClustersInstancesInjectFaultCall { + 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 *ProjectsLocationsClustersInstancesInjectFaultCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsClustersInstancesInjectFaultCall) 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.injectfaultrequest) + if err != nil { + return nil, err + } + reqHeaders.Set("Content-Type", "application/json") + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+name}:injectFault") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("POST", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "name": c.name, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "alloydb.projects.locations.clusters.instances.injectFault" 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 *ProjectsLocationsClustersInstancesInjectFaultCall) Do(opts ...googleapi.CallOption) (*Operation, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, gensupport.WrapError(&googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + }) + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, gensupport.WrapError(err) + } + ret := &Operation{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Injects fault in an instance. Imperative only.", + // "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/clusters/{clustersId}/instances/{instancesId}:injectFault", + // "httpMethod": "POST", + // "id": "alloydb.projects.locations.clusters.instances.injectFault", + // "parameterOrder": [ + // "name" + // ], + // "parameters": { + // "name": { + // "description": "Required. The name of the resource. For the required format, see the comment on the Instance.name field.", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+/clusters/[^/]+/instances/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1alpha/{+name}:injectFault", + // "request": { + // "$ref": "InjectFaultRequest" + // }, + // "response": { + // "$ref": "Operation" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "alloydb.projects.locations.clusters.instances.list": + +type ProjectsLocationsClustersInstancesListCall struct { + s *Service + parent string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// List: Lists Instances in a given project and location. +// +// - parent: The name of the parent resource. For the required format, +// see the comment on the Instance.name field. Additionally, you can +// perform an aggregated list operation by specifying a value with one +// of the following formats: * +// projects/{project}/locations/-/clusters/- * +// projects/{project}/locations/{region}/clusters/-. +func (r *ProjectsLocationsClustersInstancesService) List(parent string) *ProjectsLocationsClustersInstancesListCall { + c := &ProjectsLocationsClustersInstancesListCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + return c +} + +// Filter sets the optional parameter "filter": Filtering results +func (c *ProjectsLocationsClustersInstancesListCall) Filter(filter string) *ProjectsLocationsClustersInstancesListCall { + c.urlParams_.Set("filter", filter) + return c +} + +// OrderBy sets the optional parameter "orderBy": Hint for how to order +// the results +func (c *ProjectsLocationsClustersInstancesListCall) OrderBy(orderBy string) *ProjectsLocationsClustersInstancesListCall { + c.urlParams_.Set("orderBy", orderBy) + return c +} + +// PageSize sets the optional parameter "pageSize": Requested page size. +// Server may return fewer items than requested. If unspecified, server +// will pick an appropriate default. +func (c *ProjectsLocationsClustersInstancesListCall) PageSize(pageSize int64) *ProjectsLocationsClustersInstancesListCall { + c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) + return c +} + +// PageToken sets the optional parameter "pageToken": A token +// identifying a page of results the server should return. +func (c *ProjectsLocationsClustersInstancesListCall) PageToken(pageToken string) *ProjectsLocationsClustersInstancesListCall { + 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 *ProjectsLocationsClustersInstancesListCall) Fields(s ...googleapi.Field) *ProjectsLocationsClustersInstancesListCall { + 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 *ProjectsLocationsClustersInstancesListCall) IfNoneMatch(entityTag string) *ProjectsLocationsClustersInstancesListCall { + 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 *ProjectsLocationsClustersInstancesListCall) Context(ctx context.Context) *ProjectsLocationsClustersInstancesListCall { + 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 *ProjectsLocationsClustersInstancesListCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsClustersInstancesListCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) + } + var body io.Reader = nil + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+parent}/instances") + 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 "alloydb.projects.locations.clusters.instances.list" call. +// Exactly one of *ListInstancesResponse or error will be non-nil. Any +// non-2xx status code is an error. Response headers are in either +// *ListInstancesResponse.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 *ProjectsLocationsClustersInstancesListCall) Do(opts ...googleapi.CallOption) (*ListInstancesResponse, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, gensupport.WrapError(&googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + }) + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, gensupport.WrapError(err) + } + ret := &ListInstancesResponse{ + 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 Instances in a given project and location.", + // "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/clusters/{clustersId}/instances", + // "httpMethod": "GET", + // "id": "alloydb.projects.locations.clusters.instances.list", + // "parameterOrder": [ + // "parent" + // ], + // "parameters": { + // "filter": { + // "description": "Optional. Filtering results", + // "location": "query", + // "type": "string" + // }, + // "orderBy": { + // "description": "Optional. Hint for how to order the results", + // "location": "query", + // "type": "string" + // }, + // "pageSize": { + // "description": "Optional. Requested page size. Server may return fewer items than requested. If unspecified, server will pick an appropriate default.", + // "format": "int32", + // "location": "query", + // "type": "integer" + // }, + // "pageToken": { + // "description": "A token identifying a page of results the server should return.", + // "location": "query", + // "type": "string" + // }, + // "parent": { + // "description": "Required. The name of the parent resource. For the required format, see the comment on the Instance.name field. Additionally, you can perform an aggregated list operation by specifying a value with one of the following formats: * projects/{project}/locations/-/clusters/- * projects/{project}/locations/{region}/clusters/-", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+/clusters/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1alpha/{+parent}/instances", + // "response": { + // "$ref": "ListInstancesResponse" + // }, + // "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 *ProjectsLocationsClustersInstancesListCall) Pages(ctx context.Context, f func(*ListInstancesResponse) 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 "alloydb.projects.locations.clusters.instances.patch": + +type ProjectsLocationsClustersInstancesPatchCall struct { + s *Service + name string + instance *Instance + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Patch: Updates the parameters of a single Instance. +// +// - name: Output only. The name of the instance resource with the +// format: * +// projects/{project}/locations/{region}/clusters/{cluster_id}/instance +// s/{instance_id} where the cluster and instance ID segments should +// satisfy the regex expression `[a-z]([a-z0-9-]{0,61}[a-z0-9])?`, +// e.g. 1-63 characters of lowercase letters, numbers, and dashes, +// starting with a letter, and ending with a letter or number. For +// more details see https://google.aip.dev/122. The prefix of the +// instance resource name is the name of the parent resource: * +// projects/{project}/locations/{region}/clusters/{cluster_id}. +func (r *ProjectsLocationsClustersInstancesService) Patch(name string, instance *Instance) *ProjectsLocationsClustersInstancesPatchCall { + c := &ProjectsLocationsClustersInstancesPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + c.instance = instance + return c +} + +// AllowMissing sets the optional parameter "allowMissing": If set to +// true, update succeeds even if instance is not found. In that case, a +// new instance is created and `update_mask` is ignored. +func (c *ProjectsLocationsClustersInstancesPatchCall) AllowMissing(allowMissing bool) *ProjectsLocationsClustersInstancesPatchCall { + c.urlParams_.Set("allowMissing", fmt.Sprint(allowMissing)) + return c +} + +// RequestId sets the optional parameter "requestId": An optional +// request ID to identify requests. Specify a unique request ID so that +// if you must retry your request, the server will know to ignore the +// request if it has already been completed. The server will guarantee +// that for at least 60 minutes since the first request. For example, +// consider a situation where you make an initial request and the +// request times out. If you make the request again with the same +// request ID, the server can check if original operation with the same +// request ID was received, and if so, will ignore the second request. +// This prevents clients from accidentally creating duplicate +// commitments. The request ID must be a valid UUID with the exception +// that zero UUID is not supported +// (00000000-0000-0000-0000-000000000000). +func (c *ProjectsLocationsClustersInstancesPatchCall) RequestId(requestId string) *ProjectsLocationsClustersInstancesPatchCall { + c.urlParams_.Set("requestId", requestId) + return c +} + +// UpdateMask sets the optional parameter "updateMask": Field mask is +// used to specify the fields to be overwritten in the Instance resource +// by the update. The fields specified in the update_mask are relative +// to the resource, not the full request. A field will be overwritten if +// it is in the mask. If the user does not provide a mask then all +// fields will be overwritten. +func (c *ProjectsLocationsClustersInstancesPatchCall) UpdateMask(updateMask string) *ProjectsLocationsClustersInstancesPatchCall { + c.urlParams_.Set("updateMask", updateMask) + return c +} + +// ValidateOnly sets the optional parameter "validateOnly": If set, +// performs request validation (e.g. permission checks and any other +// type of validation), but do not actually execute the update request. +func (c *ProjectsLocationsClustersInstancesPatchCall) ValidateOnly(validateOnly bool) *ProjectsLocationsClustersInstancesPatchCall { + 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 *ProjectsLocationsClustersInstancesPatchCall) Fields(s ...googleapi.Field) *ProjectsLocationsClustersInstancesPatchCall { + 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 *ProjectsLocationsClustersInstancesPatchCall) Context(ctx context.Context) *ProjectsLocationsClustersInstancesPatchCall { + 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 *ProjectsLocationsClustersInstancesPatchCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsClustersInstancesPatchCall) 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.instance) + if err != nil { + return nil, err + } + reqHeaders.Set("Content-Type", "application/json") + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+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 "alloydb.projects.locations.clusters.instances.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 *ProjectsLocationsClustersInstancesPatchCall) Do(opts ...googleapi.CallOption) (*Operation, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, gensupport.WrapError(&googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + }) + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, gensupport.WrapError(err) + } + ret := &Operation{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Updates the parameters of a single Instance.", + // "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/clusters/{clustersId}/instances/{instancesId}", + // "httpMethod": "PATCH", + // "id": "alloydb.projects.locations.clusters.instances.patch", + // "parameterOrder": [ + // "name" + // ], + // "parameters": { + // "allowMissing": { + // "description": "Optional. If set to true, update succeeds even if instance is not found. In that case, a new instance is created and `update_mask` is ignored.", + // "location": "query", + // "type": "boolean" + // }, + // "name": { + // "description": "Output only. The name of the instance resource with the format: * projects/{project}/locations/{region}/clusters/{cluster_id}/instances/{instance_id} where the cluster and instance ID segments should satisfy the regex expression `[a-z]([a-z0-9-]{0,61}[a-z0-9])?`, e.g. 1-63 characters of lowercase letters, numbers, and dashes, starting with a letter, and ending with a letter or number. For more details see https://google.aip.dev/122. The prefix of the instance resource name is the name of the parent resource: * projects/{project}/locations/{region}/clusters/{cluster_id}", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+/clusters/[^/]+/instances/[^/]+$", + // "required": true, + // "type": "string" + // }, + // "requestId": { + // "description": "Optional. An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. The server will guarantee that for at least 60 minutes since the first request. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", + // "location": "query", + // "type": "string" + // }, + // "updateMask": { + // "description": "Optional. Field mask is used to specify the fields to be overwritten in the Instance resource by the update. The fields specified in the update_mask are relative to the resource, not the full request. A field will be overwritten if it is in the mask. If the user does not provide a mask then all fields will be overwritten.", + // "format": "google-fieldmask", + // "location": "query", + // "type": "string" + // }, + // "validateOnly": { + // "description": "Optional. If set, performs request validation (e.g. permission checks and any other type of validation), but do not actually execute the update request.", + // "location": "query", + // "type": "boolean" + // } + // }, + // "path": "v1alpha/{+name}", + // "request": { + // "$ref": "Instance" + // }, + // "response": { + // "$ref": "Operation" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "alloydb.projects.locations.clusters.instances.restart": + +type ProjectsLocationsClustersInstancesRestartCall struct { + s *Service + name string + restartinstancerequest *RestartInstanceRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Restart: Restart an Instance in a cluster. Imperative only. +// +// - name: The name of the resource. For the required format, see the +// comment on the Instance.name field. +func (r *ProjectsLocationsClustersInstancesService) Restart(name string, restartinstancerequest *RestartInstanceRequest) *ProjectsLocationsClustersInstancesRestartCall { + c := &ProjectsLocationsClustersInstancesRestartCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + c.restartinstancerequest = restartinstancerequest + 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 *ProjectsLocationsClustersInstancesRestartCall) Fields(s ...googleapi.Field) *ProjectsLocationsClustersInstancesRestartCall { + 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 *ProjectsLocationsClustersInstancesRestartCall) Context(ctx context.Context) *ProjectsLocationsClustersInstancesRestartCall { + 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 *ProjectsLocationsClustersInstancesRestartCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsClustersInstancesRestartCall) 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.restartinstancerequest) + if err != nil { + return nil, err + } + reqHeaders.Set("Content-Type", "application/json") + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+name}:restart") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("POST", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "name": c.name, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "alloydb.projects.locations.clusters.instances.restart" 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 *ProjectsLocationsClustersInstancesRestartCall) Do(opts ...googleapi.CallOption) (*Operation, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, gensupport.WrapError(&googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + }) + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, gensupport.WrapError(err) + } + ret := &Operation{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Restart an Instance in a cluster. Imperative only.", + // "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/clusters/{clustersId}/instances/{instancesId}:restart", + // "httpMethod": "POST", + // "id": "alloydb.projects.locations.clusters.instances.restart", + // "parameterOrder": [ + // "name" + // ], + // "parameters": { + // "name": { + // "description": "Required. The name of the resource. For the required format, see the comment on the Instance.name field.", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+/clusters/[^/]+/instances/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1alpha/{+name}:restart", + // "request": { + // "$ref": "RestartInstanceRequest" + // }, + // "response": { + // "$ref": "Operation" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "alloydb.projects.locations.clusters.users.create": + +type ProjectsLocationsClustersUsersCreateCall struct { + s *Service + parent string + user *User + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Create: Creates a new User in a given project, location, and cluster. +// +// - parent: Value for parent. +func (r *ProjectsLocationsClustersUsersService) Create(parent string, user *User) *ProjectsLocationsClustersUsersCreateCall { + c := &ProjectsLocationsClustersUsersCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + c.user = user + return c +} + +// RequestId sets the optional parameter "requestId": An optional +// request ID to identify requests. Specify a unique request ID so that +// if you must retry your request, the server will know to ignore the +// request if it has already been completed. The server will guarantee +// that for at least 60 minutes since the first request. For example, +// consider a situation where you make an initial request and the +// request times out. If you make the request again with the same +// request ID, the server can check if original operation with the same +// request ID was received, and if so, will ignore the second request. +// This prevents clients from accidentally creating duplicate +// commitments. The request ID must be a valid UUID with the exception +// that zero UUID is not supported +// (00000000-0000-0000-0000-000000000000). +func (c *ProjectsLocationsClustersUsersCreateCall) RequestId(requestId string) *ProjectsLocationsClustersUsersCreateCall { + c.urlParams_.Set("requestId", requestId) + return c +} + +// UserId sets the optional parameter "userId": Required. ID of the +// requesting object. +func (c *ProjectsLocationsClustersUsersCreateCall) UserId(userId string) *ProjectsLocationsClustersUsersCreateCall { + c.urlParams_.Set("userId", userId) + return c +} + +// ValidateOnly sets the optional parameter "validateOnly": If set, the +// backend validates the request, but doesn't actually execute it. +func (c *ProjectsLocationsClustersUsersCreateCall) ValidateOnly(validateOnly bool) *ProjectsLocationsClustersUsersCreateCall { + 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 *ProjectsLocationsClustersUsersCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsClustersUsersCreateCall { + 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 *ProjectsLocationsClustersUsersCreateCall) Context(ctx context.Context) *ProjectsLocationsClustersUsersCreateCall { + 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 *ProjectsLocationsClustersUsersCreateCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsClustersUsersCreateCall) 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.user) + if err != nil { + return nil, err + } + reqHeaders.Set("Content-Type", "application/json") + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+parent}/users") + 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 "alloydb.projects.locations.clusters.users.create" call. +// Exactly one of *User or error will be non-nil. Any non-2xx status +// code is an error. Response headers are in either +// *User.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 *ProjectsLocationsClustersUsersCreateCall) Do(opts ...googleapi.CallOption) (*User, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, gensupport.WrapError(&googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + }) + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, gensupport.WrapError(err) + } + ret := &User{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Creates a new User in a given project, location, and cluster.", + // "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/clusters/{clustersId}/users", + // "httpMethod": "POST", + // "id": "alloydb.projects.locations.clusters.users.create", + // "parameterOrder": [ + // "parent" + // ], + // "parameters": { + // "parent": { + // "description": "Required. Value for parent.", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+/clusters/[^/]+$", + // "required": true, + // "type": "string" + // }, + // "requestId": { + // "description": "Optional. An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. The server will guarantee that for at least 60 minutes since the first request. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", + // "location": "query", + // "type": "string" + // }, + // "userId": { + // "description": "Required. ID of the requesting object.", + // "location": "query", + // "type": "string" + // }, + // "validateOnly": { + // "description": "Optional. If set, the backend validates the request, but doesn't actually execute it.", + // "location": "query", + // "type": "boolean" + // } + // }, + // "path": "v1alpha/{+parent}/users", + // "request": { + // "$ref": "User" + // }, + // "response": { + // "$ref": "User" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "alloydb.projects.locations.clusters.users.delete": + +type ProjectsLocationsClustersUsersDeleteCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Delete: Deletes a single User. +// +// - name: The name of the resource. For the required format, see the +// comment on the User.name field. +func (r *ProjectsLocationsClustersUsersService) Delete(name string) *ProjectsLocationsClustersUsersDeleteCall { + c := &ProjectsLocationsClustersUsersDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + return c +} + +// RequestId sets the optional parameter "requestId": An optional +// request ID to identify requests. Specify a unique request ID so that +// if you must retry your request, the server will know to ignore the +// request if it has already been completed. The server will guarantee +// that for at least 60 minutes after the first request. For example, +// consider a situation where you make an initial request and the +// request times out. If you make the request again with the same +// request ID, the server can check if original operation with the same +// request ID was received, and if so, will ignore the second request. +// This prevents clients from accidentally creating duplicate +// commitments. The request ID must be a valid UUID with the exception +// that zero UUID is not supported +// (00000000-0000-0000-0000-000000000000). +func (c *ProjectsLocationsClustersUsersDeleteCall) RequestId(requestId string) *ProjectsLocationsClustersUsersDeleteCall { + c.urlParams_.Set("requestId", requestId) + return c +} + +// ValidateOnly sets the optional parameter "validateOnly": If set, the +// backend validates the request, but doesn't actually execute it. +func (c *ProjectsLocationsClustersUsersDeleteCall) ValidateOnly(validateOnly bool) *ProjectsLocationsClustersUsersDeleteCall { + 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 *ProjectsLocationsClustersUsersDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsClustersUsersDeleteCall { + 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 *ProjectsLocationsClustersUsersDeleteCall) Context(ctx context.Context) *ProjectsLocationsClustersUsersDeleteCall { + 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 *ProjectsLocationsClustersUsersDeleteCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsClustersUsersDeleteCall) 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, "v1alpha/{+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 "alloydb.projects.locations.clusters.users.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 *ProjectsLocationsClustersUsersDeleteCall) Do(opts ...googleapi.CallOption) (*Empty, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, gensupport.WrapError(&googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + }) + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, gensupport.WrapError(err) + } + ret := &Empty{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Deletes a single User.", + // "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/clusters/{clustersId}/users/{usersId}", + // "httpMethod": "DELETE", + // "id": "alloydb.projects.locations.clusters.users.delete", + // "parameterOrder": [ + // "name" + // ], + // "parameters": { + // "name": { + // "description": "Required. The name of the resource. For the required format, see the comment on the User.name field.", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+/clusters/[^/]+/users/[^/]+$", + // "required": true, + // "type": "string" + // }, + // "requestId": { + // "description": "Optional. An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. The server will guarantee that for at least 60 minutes after the first request. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", + // "location": "query", + // "type": "string" + // }, + // "validateOnly": { + // "description": "Optional. If set, the backend validates the request, but doesn't actually execute it.", + // "location": "query", + // "type": "boolean" + // } + // }, + // "path": "v1alpha/{+name}", + // "response": { + // "$ref": "Empty" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "alloydb.projects.locations.clusters.users.get": + +type ProjectsLocationsClustersUsersGetCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// Get: Gets details of a single User. +// +// - name: The name of the resource. For the required format, see the +// comment on the User.name field. +func (r *ProjectsLocationsClustersUsersService) Get(name string) *ProjectsLocationsClustersUsersGetCall { + c := &ProjectsLocationsClustersUsersGetCall{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 *ProjectsLocationsClustersUsersGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsClustersUsersGetCall { + 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 *ProjectsLocationsClustersUsersGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsClustersUsersGetCall { + 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 *ProjectsLocationsClustersUsersGetCall) Context(ctx context.Context) *ProjectsLocationsClustersUsersGetCall { + 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 *ProjectsLocationsClustersUsersGetCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsClustersUsersGetCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) + } + var body io.Reader = nil + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+name}") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("GET", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "name": c.name, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "alloydb.projects.locations.clusters.users.get" call. +// Exactly one of *User or error will be non-nil. Any non-2xx status +// code is an error. Response headers are in either +// *User.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 *ProjectsLocationsClustersUsersGetCall) Do(opts ...googleapi.CallOption) (*User, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, gensupport.WrapError(&googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + }) + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, gensupport.WrapError(err) + } + ret := &User{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Gets details of a single User.", + // "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/clusters/{clustersId}/users/{usersId}", + // "httpMethod": "GET", + // "id": "alloydb.projects.locations.clusters.users.get", + // "parameterOrder": [ + // "name" + // ], + // "parameters": { + // "name": { + // "description": "Required. The name of the resource. For the required format, see the comment on the User.name field.", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+/clusters/[^/]+/users/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1alpha/{+name}", + // "response": { + // "$ref": "User" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "alloydb.projects.locations.clusters.users.list": + +type ProjectsLocationsClustersUsersListCall struct { + s *Service + parent string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// List: Lists Users in a given project and location. +// +// - parent: Parent value for ListUsersRequest. +func (r *ProjectsLocationsClustersUsersService) List(parent string) *ProjectsLocationsClustersUsersListCall { + c := &ProjectsLocationsClustersUsersListCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + return c +} + +// Filter sets the optional parameter "filter": Filtering results +func (c *ProjectsLocationsClustersUsersListCall) Filter(filter string) *ProjectsLocationsClustersUsersListCall { + c.urlParams_.Set("filter", filter) + return c +} + +// OrderBy sets the optional parameter "orderBy": Hint for how to order +// the results +func (c *ProjectsLocationsClustersUsersListCall) OrderBy(orderBy string) *ProjectsLocationsClustersUsersListCall { + c.urlParams_.Set("orderBy", orderBy) + return c +} + +// PageSize sets the optional parameter "pageSize": Requested page size. +// Server may return fewer items than requested. If unspecified, server +// will pick an appropriate default. +func (c *ProjectsLocationsClustersUsersListCall) PageSize(pageSize int64) *ProjectsLocationsClustersUsersListCall { + c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) + return c +} + +// PageToken sets the optional parameter "pageToken": A token +// identifying a page of results the server should return. +func (c *ProjectsLocationsClustersUsersListCall) PageToken(pageToken string) *ProjectsLocationsClustersUsersListCall { + 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 *ProjectsLocationsClustersUsersListCall) Fields(s ...googleapi.Field) *ProjectsLocationsClustersUsersListCall { + 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 *ProjectsLocationsClustersUsersListCall) IfNoneMatch(entityTag string) *ProjectsLocationsClustersUsersListCall { + 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 *ProjectsLocationsClustersUsersListCall) Context(ctx context.Context) *ProjectsLocationsClustersUsersListCall { + 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 *ProjectsLocationsClustersUsersListCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsClustersUsersListCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) + } + var body io.Reader = nil + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+parent}/users") + 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 "alloydb.projects.locations.clusters.users.list" call. +// Exactly one of *ListUsersResponse or error will be non-nil. Any +// non-2xx status code is an error. Response headers are in either +// *ListUsersResponse.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 *ProjectsLocationsClustersUsersListCall) Do(opts ...googleapi.CallOption) (*ListUsersResponse, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, gensupport.WrapError(&googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + }) + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, gensupport.WrapError(err) + } + ret := &ListUsersResponse{ + 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 Users in a given project and location.", + // "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/clusters/{clustersId}/users", + // "httpMethod": "GET", + // "id": "alloydb.projects.locations.clusters.users.list", + // "parameterOrder": [ + // "parent" + // ], + // "parameters": { + // "filter": { + // "description": "Optional. Filtering results", + // "location": "query", + // "type": "string" + // }, + // "orderBy": { + // "description": "Optional. Hint for how to order the results", + // "location": "query", + // "type": "string" + // }, + // "pageSize": { + // "description": "Optional. Requested page size. Server may return fewer items than requested. If unspecified, server will pick an appropriate default.", + // "format": "int32", + // "location": "query", + // "type": "integer" + // }, + // "pageToken": { + // "description": "Optional. A token identifying a page of results the server should return.", + // "location": "query", + // "type": "string" + // }, + // "parent": { + // "description": "Required. Parent value for ListUsersRequest", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+/clusters/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1alpha/{+parent}/users", + // "response": { + // "$ref": "ListUsersResponse" + // }, + // "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 *ProjectsLocationsClustersUsersListCall) Pages(ctx context.Context, f func(*ListUsersResponse) 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 "alloydb.projects.locations.clusters.users.patch": + +type ProjectsLocationsClustersUsersPatchCall struct { + s *Service + name string + user *User + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Patch: Updates the parameters of a single User. +// +// - name: Output only. Name of the resource in the form of +// projects/{project}/locations/{location}/cluster/{cluster}/users/{use +// r}. +func (r *ProjectsLocationsClustersUsersService) Patch(name string, user *User) *ProjectsLocationsClustersUsersPatchCall { + c := &ProjectsLocationsClustersUsersPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + c.user = user + return c +} + +// AllowMissing sets the optional parameter "allowMissing": Allow +// missing fields in the update mask. +func (c *ProjectsLocationsClustersUsersPatchCall) AllowMissing(allowMissing bool) *ProjectsLocationsClustersUsersPatchCall { + c.urlParams_.Set("allowMissing", fmt.Sprint(allowMissing)) + return c +} + +// RequestId sets the optional parameter "requestId": An optional +// request ID to identify requests. Specify a unique request ID so that +// if you must retry your request, the server will know to ignore the +// request if it has already been completed. The server will guarantee +// that for at least 60 minutes since the first request. For example, +// consider a situation where you make an initial request and the +// request times out. If you make the request again with the same +// request ID, the server can check if original operation with the same +// request ID was received, and if so, will ignore the second request. +// This prevents clients from accidentally creating duplicate +// commitments. The request ID must be a valid UUID with the exception +// that zero UUID is not supported +// (00000000-0000-0000-0000-000000000000). +func (c *ProjectsLocationsClustersUsersPatchCall) RequestId(requestId string) *ProjectsLocationsClustersUsersPatchCall { + c.urlParams_.Set("requestId", requestId) + return c +} + +// UpdateMask sets the optional parameter "updateMask": Field mask is +// used to specify the fields to be overwritten in the User resource by +// the update. The fields specified in the update_mask are relative to +// the resource, not the full request. A field will be overwritten if it +// is in the mask. If the user does not provide a mask then all fields +// will be overwritten. +func (c *ProjectsLocationsClustersUsersPatchCall) UpdateMask(updateMask string) *ProjectsLocationsClustersUsersPatchCall { + c.urlParams_.Set("updateMask", updateMask) + return c +} + +// ValidateOnly sets the optional parameter "validateOnly": If set, the +// backend validates the request, but doesn't actually execute it. +func (c *ProjectsLocationsClustersUsersPatchCall) ValidateOnly(validateOnly bool) *ProjectsLocationsClustersUsersPatchCall { + 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 *ProjectsLocationsClustersUsersPatchCall) Fields(s ...googleapi.Field) *ProjectsLocationsClustersUsersPatchCall { + 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 *ProjectsLocationsClustersUsersPatchCall) Context(ctx context.Context) *ProjectsLocationsClustersUsersPatchCall { + 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 *ProjectsLocationsClustersUsersPatchCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsClustersUsersPatchCall) 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.user) + if err != nil { + return nil, err + } + reqHeaders.Set("Content-Type", "application/json") + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+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 "alloydb.projects.locations.clusters.users.patch" call. +// Exactly one of *User or error will be non-nil. Any non-2xx status +// code is an error. Response headers are in either +// *User.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 *ProjectsLocationsClustersUsersPatchCall) Do(opts ...googleapi.CallOption) (*User, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, gensupport.WrapError(&googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + }) + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, gensupport.WrapError(err) + } + ret := &User{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Updates the parameters of a single User.", + // "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/clusters/{clustersId}/users/{usersId}", + // "httpMethod": "PATCH", + // "id": "alloydb.projects.locations.clusters.users.patch", + // "parameterOrder": [ + // "name" + // ], + // "parameters": { + // "allowMissing": { + // "description": "Optional. Allow missing fields in the update mask.", + // "location": "query", + // "type": "boolean" + // }, + // "name": { + // "description": "Output only. Name of the resource in the form of projects/{project}/locations/{location}/cluster/{cluster}/users/{user}.", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+/clusters/[^/]+/users/[^/]+$", + // "required": true, + // "type": "string" + // }, + // "requestId": { + // "description": "Optional. An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. The server will guarantee that for at least 60 minutes since the first request. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", + // "location": "query", + // "type": "string" + // }, + // "updateMask": { + // "description": "Optional. Field mask is used to specify the fields to be overwritten in the User resource by the update. The fields specified in the update_mask are relative to the resource, not the full request. A field will be overwritten if it is in the mask. If the user does not provide a mask then all fields will be overwritten.", + // "format": "google-fieldmask", + // "location": "query", + // "type": "string" + // }, + // "validateOnly": { + // "description": "Optional. If set, the backend validates the request, but doesn't actually execute it.", + // "location": "query", + // "type": "boolean" + // } + // }, + // "path": "v1alpha/{+name}", + // "request": { + // "$ref": "User" + // }, + // "response": { + // "$ref": "User" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "alloydb.projects.locations.operations.cancel": + +type ProjectsLocationsOperationsCancelCall struct { + s *Service + name string + canceloperationrequest *CancelOperationRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Cancel: Starts asynchronous cancellation on a long-running operation. +// The server makes a best effort to cancel the operation, but success +// is not guaranteed. If the server doesn't support this method, it +// returns `google.rpc.Code.UNIMPLEMENTED`. Clients can use +// Operations.GetOperation or other methods to check whether the +// cancellation succeeded or whether the operation completed despite +// cancellation. On successful cancellation, the operation is not +// deleted; instead, it becomes an operation with an Operation.error +// value with a google.rpc.Status.code of 1, corresponding to +// `Code.CANCELLED`. +// +// - name: The name of the operation resource to be cancelled. +func (r *ProjectsLocationsOperationsService) Cancel(name string, canceloperationrequest *CancelOperationRequest) *ProjectsLocationsOperationsCancelCall { + c := &ProjectsLocationsOperationsCancelCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + c.canceloperationrequest = canceloperationrequest + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *ProjectsLocationsOperationsCancelCall) Fields(s ...googleapi.Field) *ProjectsLocationsOperationsCancelCall { + 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 *ProjectsLocationsOperationsCancelCall) Context(ctx context.Context) *ProjectsLocationsOperationsCancelCall { + 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 *ProjectsLocationsOperationsCancelCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsOperationsCancelCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.canceloperationrequest) + if err != nil { + return nil, err + } + reqHeaders.Set("Content-Type", "application/json") + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+name}:cancel") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("POST", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "name": c.name, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "alloydb.projects.locations.operations.cancel" call. +// Exactly one of *Empty or error will be non-nil. Any non-2xx status +// code is an error. Response headers are in either +// *Empty.ServerResponse.Header or (if a response was returned at all) +// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to +// check whether the returned error was because http.StatusNotModified +// was returned. +func (c *ProjectsLocationsOperationsCancelCall) Do(opts ...googleapi.CallOption) (*Empty, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, gensupport.WrapError(&googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + }) + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, gensupport.WrapError(err) + } + ret := &Empty{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Starts asynchronous cancellation on a long-running operation. The server makes a best effort to cancel the operation, but success is not guaranteed. If the server doesn't support this method, it returns `google.rpc.Code.UNIMPLEMENTED`. Clients can use Operations.GetOperation or other methods to check whether the cancellation succeeded or whether the operation completed despite cancellation. On successful cancellation, the operation is not deleted; instead, it becomes an operation with an Operation.error value with a google.rpc.Status.code of 1, corresponding to `Code.CANCELLED`.", + // "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/operations/{operationsId}:cancel", + // "httpMethod": "POST", + // "id": "alloydb.projects.locations.operations.cancel", + // "parameterOrder": [ + // "name" + // ], + // "parameters": { + // "name": { + // "description": "The name of the operation resource to be cancelled.", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+/operations/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1alpha/{+name}:cancel", + // "request": { + // "$ref": "CancelOperationRequest" + // }, + // "response": { + // "$ref": "Empty" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "alloydb.projects.locations.operations.delete": + +type ProjectsLocationsOperationsDeleteCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Delete: Deletes a long-running operation. This method indicates that +// the client is no longer interested in the operation result. It does +// not cancel the operation. If the server doesn't support this method, +// it returns `google.rpc.Code.UNIMPLEMENTED`. +// +// - name: The name of the operation resource to be deleted. +func (r *ProjectsLocationsOperationsService) Delete(name string) *ProjectsLocationsOperationsDeleteCall { + c := &ProjectsLocationsOperationsDeleteCall{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 *ProjectsLocationsOperationsDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsOperationsDeleteCall { + 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 *ProjectsLocationsOperationsDeleteCall) Context(ctx context.Context) *ProjectsLocationsOperationsDeleteCall { + 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 *ProjectsLocationsOperationsDeleteCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsOperationsDeleteCall) 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, "v1alpha/{+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 "alloydb.projects.locations.operations.delete" call. +// Exactly one of *Empty or error will be non-nil. Any non-2xx status +// code is an error. Response headers are in either +// *Empty.ServerResponse.Header or (if a response was returned at all) +// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to +// check whether the returned error was because http.StatusNotModified +// was returned. +func (c *ProjectsLocationsOperationsDeleteCall) Do(opts ...googleapi.CallOption) (*Empty, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, gensupport.WrapError(&googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + }) + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, gensupport.WrapError(err) + } + ret := &Empty{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Deletes a long-running operation. This method indicates that the client is no longer interested in the operation result. It does not cancel the operation. If the server doesn't support this method, it returns `google.rpc.Code.UNIMPLEMENTED`.", + // "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/operations/{operationsId}", + // "httpMethod": "DELETE", + // "id": "alloydb.projects.locations.operations.delete", + // "parameterOrder": [ + // "name" + // ], + // "parameters": { + // "name": { + // "description": "The name of the operation resource to be deleted.", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+/operations/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1alpha/{+name}", + // "response": { + // "$ref": "Empty" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "alloydb.projects.locations.operations.get": + +type ProjectsLocationsOperationsGetCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// Get: Gets the latest state of a long-running operation. Clients can +// use this method to poll the operation result at intervals as +// recommended by the API service. +// +// - name: The name of the operation resource. +func (r *ProjectsLocationsOperationsService) Get(name string) *ProjectsLocationsOperationsGetCall { + c := &ProjectsLocationsOperationsGetCall{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 *ProjectsLocationsOperationsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsOperationsGetCall { + 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 *ProjectsLocationsOperationsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsOperationsGetCall { + 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 *ProjectsLocationsOperationsGetCall) Context(ctx context.Context) *ProjectsLocationsOperationsGetCall { + 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 *ProjectsLocationsOperationsGetCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsOperationsGetCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) + } + var body io.Reader = nil + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+name}") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("GET", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "name": c.name, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "alloydb.projects.locations.operations.get" call. +// Exactly one of *Operation or error will be non-nil. Any non-2xx +// status code is an error. Response headers are in either +// *Operation.ServerResponse.Header or (if a response was returned at +// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified +// to check whether the returned error was because +// http.StatusNotModified was returned. +func (c *ProjectsLocationsOperationsGetCall) Do(opts ...googleapi.CallOption) (*Operation, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, gensupport.WrapError(&googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + }) + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, gensupport.WrapError(err) + } + ret := &Operation{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Gets the latest state of a long-running operation. Clients can use this method to poll the operation result at intervals as recommended by the API service.", + // "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/operations/{operationsId}", + // "httpMethod": "GET", + // "id": "alloydb.projects.locations.operations.get", + // "parameterOrder": [ + // "name" + // ], + // "parameters": { + // "name": { + // "description": "The name of the operation resource.", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+/operations/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1alpha/{+name}", + // "response": { + // "$ref": "Operation" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "alloydb.projects.locations.operations.list": + +type ProjectsLocationsOperationsListCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// List: Lists operations that match the specified filter in the +// request. If the server doesn't support this method, it returns +// `UNIMPLEMENTED`. +// +// - name: The name of the operation's parent resource. +func (r *ProjectsLocationsOperationsService) List(name string) *ProjectsLocationsOperationsListCall { + c := &ProjectsLocationsOperationsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + return c +} + +// Filter sets the optional parameter "filter": The standard list +// filter. +func (c *ProjectsLocationsOperationsListCall) Filter(filter string) *ProjectsLocationsOperationsListCall { + c.urlParams_.Set("filter", filter) + return c +} + +// PageSize sets the optional parameter "pageSize": The standard list +// page size. +func (c *ProjectsLocationsOperationsListCall) PageSize(pageSize int64) *ProjectsLocationsOperationsListCall { + c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) + return c +} + +// PageToken sets the optional parameter "pageToken": The standard list +// page token. +func (c *ProjectsLocationsOperationsListCall) PageToken(pageToken string) *ProjectsLocationsOperationsListCall { + 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 *ProjectsLocationsOperationsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsOperationsListCall { + 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 *ProjectsLocationsOperationsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsOperationsListCall { + 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 *ProjectsLocationsOperationsListCall) Context(ctx context.Context) *ProjectsLocationsOperationsListCall { + 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 *ProjectsLocationsOperationsListCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsOperationsListCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) + } + var body io.Reader = nil + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+name}/operations") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("GET", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "name": c.name, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "alloydb.projects.locations.operations.list" call. +// Exactly one of *ListOperationsResponse or error will be non-nil. Any +// non-2xx status code is an error. Response headers are in either +// *ListOperationsResponse.ServerResponse.Header or (if a response was +// returned at all) in error.(*googleapi.Error).Header. Use +// googleapi.IsNotModified to check whether the returned error was +// because http.StatusNotModified was returned. +func (c *ProjectsLocationsOperationsListCall) Do(opts ...googleapi.CallOption) (*ListOperationsResponse, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, gensupport.WrapError(&googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + }) + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, gensupport.WrapError(err) + } + ret := &ListOperationsResponse{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Lists operations that match the specified filter in the request. If the server doesn't support this method, it returns `UNIMPLEMENTED`.", + // "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/operations", + // "httpMethod": "GET", + // "id": "alloydb.projects.locations.operations.list", + // "parameterOrder": [ + // "name" + // ], + // "parameters": { + // "filter": { + // "description": "The standard list filter.", + // "location": "query", + // "type": "string" + // }, + // "name": { + // "description": "The name of the operation's parent resource.", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+$", + // "required": true, + // "type": "string" + // }, + // "pageSize": { + // "description": "The standard list page size.", + // "format": "int32", + // "location": "query", + // "type": "integer" + // }, + // "pageToken": { + // "description": "The standard list page token.", + // "location": "query", + // "type": "string" + // } + // }, + // "path": "v1alpha/{+name}/operations", + // "response": { + // "$ref": "ListOperationsResponse" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// Pages invokes f for each page of results. +// A non-nil error returned from f will halt the iteration. +// The provided context supersedes any context provided to the Context method. +func (c *ProjectsLocationsOperationsListCall) Pages(ctx context.Context, f func(*ListOperationsResponse) error) error { + c.ctx_ = ctx + defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point + for { + x, err := c.Do() + if err != nil { + return err + } + if err := f(x); err != nil { + return err + } + if x.NextPageToken == "" { + return nil + } + c.PageToken(x.NextPageToken) + } +} + +// method id "alloydb.projects.locations.supportedDatabaseFlags.list": + +type ProjectsLocationsSupportedDatabaseFlagsListCall struct { + s *Service + parent string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// List: Lists SupportedDatabaseFlags for a given project and location. +// +// - parent: The name of the parent resource. The required format is: * +// projects/{project}/locations/{location} Regardless of the parent +// specified here, as long it is contains a valid project and +// location, the service will return a static list of supported flags +// resources. Note that we do not yet support region-specific flags. +func (r *ProjectsLocationsSupportedDatabaseFlagsService) List(parent string) *ProjectsLocationsSupportedDatabaseFlagsListCall { + c := &ProjectsLocationsSupportedDatabaseFlagsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + return c +} + +// PageSize sets the optional parameter "pageSize": Requested page size. +// Server may return fewer items than requested. If unspecified, server +// will pick an appropriate default. +func (c *ProjectsLocationsSupportedDatabaseFlagsListCall) PageSize(pageSize int64) *ProjectsLocationsSupportedDatabaseFlagsListCall { + c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) + return c +} + +// PageToken sets the optional parameter "pageToken": A token +// identifying a page of results the server should return. +func (c *ProjectsLocationsSupportedDatabaseFlagsListCall) PageToken(pageToken string) *ProjectsLocationsSupportedDatabaseFlagsListCall { + 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 *ProjectsLocationsSupportedDatabaseFlagsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsSupportedDatabaseFlagsListCall { + 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 *ProjectsLocationsSupportedDatabaseFlagsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsSupportedDatabaseFlagsListCall { + 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 *ProjectsLocationsSupportedDatabaseFlagsListCall) Context(ctx context.Context) *ProjectsLocationsSupportedDatabaseFlagsListCall { + 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 *ProjectsLocationsSupportedDatabaseFlagsListCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsSupportedDatabaseFlagsListCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) + } + var body io.Reader = nil + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+parent}/supportedDatabaseFlags") + 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 "alloydb.projects.locations.supportedDatabaseFlags.list" call. +// Exactly one of *ListSupportedDatabaseFlagsResponse or error will be +// non-nil. Any non-2xx status code is an error. Response headers are in +// either *ListSupportedDatabaseFlagsResponse.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 *ProjectsLocationsSupportedDatabaseFlagsListCall) Do(opts ...googleapi.CallOption) (*ListSupportedDatabaseFlagsResponse, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, gensupport.WrapError(&googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + }) + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, gensupport.WrapError(err) + } + ret := &ListSupportedDatabaseFlagsResponse{ + 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 SupportedDatabaseFlags for a given project and location.", + // "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/supportedDatabaseFlags", + // "httpMethod": "GET", + // "id": "alloydb.projects.locations.supportedDatabaseFlags.list", + // "parameterOrder": [ + // "parent" + // ], + // "parameters": { + // "pageSize": { + // "description": "Requested page size. Server may return fewer items than requested. If unspecified, server will pick an appropriate default.", + // "format": "int32", + // "location": "query", + // "type": "integer" + // }, + // "pageToken": { + // "description": "A token identifying a page of results the server should return.", + // "location": "query", + // "type": "string" + // }, + // "parent": { + // "description": "Required. The name of the parent resource. The required format is: * projects/{project}/locations/{location} Regardless of the parent specified here, as long it is contains a valid project and location, the service will return a static list of supported flags resources. Note that we do not yet support region-specific flags.", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1alpha/{+parent}/supportedDatabaseFlags", + // "response": { + // "$ref": "ListSupportedDatabaseFlagsResponse" + // }, + // "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 *ProjectsLocationsSupportedDatabaseFlagsListCall) Pages(ctx context.Context, f func(*ListSupportedDatabaseFlagsResponse) 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) + } +} diff --git a/alloydb/v1beta/alloydb-api.json b/alloydb/v1beta/alloydb-api.json new file mode 100644 index 00000000000..31af0ce4688 --- /dev/null +++ b/alloydb/v1beta/alloydb-api.json @@ -0,0 +1,3571 @@ +{ + "auth": { + "oauth2": { + "scopes": { + "https://www.googleapis.com/auth/cloud-platform": { + "description": "See, edit, configure, and delete your Google Cloud data and see the email address for your Google Account." + } + } + } + }, + "basePath": "", + "baseUrl": "https://alloydb.googleapis.com/", + "batchPath": "batch", + "canonicalName": "Cloud AlloyDB Admin", + "description": "AlloyDB for PostgreSQL is an open source-compatible database service that provides a powerful option for migrating, modernizing, or building commercial-grade applications. It offers full compatibility with standard PostgreSQL, and is more than 4x faster for transactional workloads and up to 100x faster for analytical queries than standard PostgreSQL in our performance tests. AlloyDB for PostgreSQL offers a 99.99 percent availability SLA inclusive of maintenance. AlloyDB is optimized for the most demanding use cases, allowing you to build new applications that require high transaction throughput, large database sizes, or multiple read resources; scale existing PostgreSQL workloads with no application changes; and modernize legacy proprietary databases. ", + "discoveryVersion": "v1", + "documentationLink": "https://cloud.google.com/alloydb/", + "fullyEncodeReservedExpansion": true, + "icons": { + "x16": "http://www.google.com/images/icons/product/search-16.gif", + "x32": "http://www.google.com/images/icons/product/search-32.gif" + }, + "id": "alloydb:v1beta", + "kind": "discovery#restDescription", + "mtlsRootUrl": "https://alloydb.mtls.googleapis.com/", + "name": "alloydb", + "ownerDomain": "google.com", + "ownerName": "Google", + "parameters": { + "$.xgafv": { + "description": "V1 error format.", + "enum": [ + "1", + "2" + ], + "enumDescriptions": [ + "v1 error format", + "v2 error format" + ], + "location": "query", + "type": "string" + }, + "access_token": { + "description": "OAuth access token.", + "location": "query", + "type": "string" + }, + "alt": { + "default": "json", + "description": "Data format for response.", + "enum": [ + "json", + "media", + "proto" + ], + "enumDescriptions": [ + "Responses with Content-Type of application/json", + "Media download with context-dependent Content-Type", + "Responses with Content-Type of application/x-protobuf" + ], + "location": "query", + "type": "string" + }, + "callback": { + "description": "JSONP", + "location": "query", + "type": "string" + }, + "fields": { + "description": "Selector specifying which fields to include in a partial response.", + "location": "query", + "type": "string" + }, + "key": { + "description": "API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token.", + "location": "query", + "type": "string" + }, + "oauth_token": { + "description": "OAuth 2.0 token for the current user.", + "location": "query", + "type": "string" + }, + "prettyPrint": { + "default": "true", + "description": "Returns response with indentations and line breaks.", + "location": "query", + "type": "boolean" + }, + "quotaUser": { + "description": "Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters.", + "location": "query", + "type": "string" + }, + "uploadType": { + "description": "Legacy upload protocol for media (e.g. \"media\", \"multipart\").", + "location": "query", + "type": "string" + }, + "upload_protocol": { + "description": "Upload protocol for media (e.g. \"raw\", \"multipart\").", + "location": "query", + "type": "string" + } + }, + "protocol": "rest", + "resources": { + "projects": { + "resources": { + "locations": { + "methods": { + "get": { + "description": "Gets information about a location.", + "flatPath": "v1beta/projects/{projectsId}/locations/{locationsId}", + "httpMethod": "GET", + "id": "alloydb.projects.locations.get", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Resource name for the location.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1beta/{+name}", + "response": { + "$ref": "GoogleCloudLocationLocation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "list": { + "description": "Lists information about the supported locations for this service.", + "flatPath": "v1beta/projects/{projectsId}/locations", + "httpMethod": "GET", + "id": "alloydb.projects.locations.list", + "parameterOrder": [ + "name" + ], + "parameters": { + "filter": { + "description": "A filter to narrow down results to a preferred subset. The filtering language accepts strings like `\"displayName=tokyo\"`, and is documented in more detail in [AIP-160](https://google.aip.dev/160).", + "location": "query", + "type": "string" + }, + "name": { + "description": "The resource that owns the locations collection, if applicable.", + "location": "path", + "pattern": "^projects/[^/]+$", + "required": true, + "type": "string" + }, + "pageSize": { + "description": "The maximum number of results to return. If not set, the service selects a default.", + "format": "int32", + "location": "query", + "type": "integer" + }, + "pageToken": { + "description": "A page token received from the `next_page_token` field in the response. Send that page token to receive the subsequent page.", + "location": "query", + "type": "string" + } + }, + "path": "v1beta/{+name}/locations", + "response": { + "$ref": "GoogleCloudLocationListLocationsResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + } + }, + "resources": { + "backups": { + "methods": { + "create": { + "description": "Creates a new Backup in a given project and location.", + "flatPath": "v1beta/projects/{projectsId}/locations/{locationsId}/backups", + "httpMethod": "POST", + "id": "alloydb.projects.locations.backups.create", + "parameterOrder": [ + "parent" + ], + "parameters": { + "backupId": { + "description": "Required. ID of the requesting object.", + "location": "query", + "type": "string" + }, + "parent": { + "description": "Required. Value for parent.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+$", + "required": true, + "type": "string" + }, + "requestId": { + "description": "Optional. An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. The server will guarantee that for at least 60 minutes since the first request. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", + "location": "query", + "type": "string" + }, + "validateOnly": { + "description": "Optional. If set, the backend validates the request, but doesn't actually execute it.", + "location": "query", + "type": "boolean" + } + }, + "path": "v1beta/{+parent}/backups", + "request": { + "$ref": "Backup" + }, + "response": { + "$ref": "Operation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "delete": { + "description": "Deletes a single Backup.", + "flatPath": "v1beta/projects/{projectsId}/locations/{locationsId}/backups/{backupsId}", + "httpMethod": "DELETE", + "id": "alloydb.projects.locations.backups.delete", + "parameterOrder": [ + "name" + ], + "parameters": { + "etag": { + "description": "Optional. The current etag of the Backup. If an etag is provided and does not match the current etag of the Backup, deletion will be blocked and an ABORTED error will be returned.", + "location": "query", + "type": "string" + }, + "name": { + "description": "Required. Name of the resource. For the required format, see the comment on the Backup.name field.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/backups/[^/]+$", + "required": true, + "type": "string" + }, + "requestId": { + "description": "Optional. An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. The server will guarantee that for at least 60 minutes after the first request. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", + "location": "query", + "type": "string" + }, + "validateOnly": { + "description": "Optional. If set, the backend validates the request, but doesn't actually execute it.", + "location": "query", + "type": "boolean" + } + }, + "path": "v1beta/{+name}", + "response": { + "$ref": "Operation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "get": { + "description": "Gets details of a single Backup.", + "flatPath": "v1beta/projects/{projectsId}/locations/{locationsId}/backups/{backupsId}", + "httpMethod": "GET", + "id": "alloydb.projects.locations.backups.get", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Required. Name of the resource", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/backups/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1beta/{+name}", + "response": { + "$ref": "Backup" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "list": { + "description": "Lists Backups in a given project and location.", + "flatPath": "v1beta/projects/{projectsId}/locations/{locationsId}/backups", + "httpMethod": "GET", + "id": "alloydb.projects.locations.backups.list", + "parameterOrder": [ + "parent" + ], + "parameters": { + "filter": { + "description": "Filtering results", + "location": "query", + "type": "string" + }, + "orderBy": { + "description": "Hint for how to order the results", + "location": "query", + "type": "string" + }, + "pageSize": { + "description": "Requested page size. Server may return fewer items than requested. If unspecified, server will pick an appropriate default.", + "format": "int32", + "location": "query", + "type": "integer" + }, + "pageToken": { + "description": "A token identifying a page of results the server should return.", + "location": "query", + "type": "string" + }, + "parent": { + "description": "Required. Parent value for ListBackupsRequest", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1beta/{+parent}/backups", + "response": { + "$ref": "ListBackupsResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "patch": { + "description": "Updates the parameters of a single Backup.", + "flatPath": "v1beta/projects/{projectsId}/locations/{locationsId}/backups/{backupsId}", + "httpMethod": "PATCH", + "id": "alloydb.projects.locations.backups.patch", + "parameterOrder": [ + "name" + ], + "parameters": { + "allowMissing": { + "description": "Optional. If set to true, update succeeds even if instance is not found. In that case, a new backup is created and `update_mask` is ignored.", + "location": "query", + "type": "boolean" + }, + "name": { + "description": "Output only. The name of the backup resource with the format: * projects/{project}/locations/{region}/backups/{backup_id} where the cluster and backup ID segments should satisfy the regex expression `[a-z]([a-z0-9-]{0,61}[a-z0-9])?`, e.g. 1-63 characters of lowercase letters, numbers, and dashes, starting with a letter, and ending with a letter or number. For more details see https://google.aip.dev/122. The prefix of the backup resource name is the name of the parent resource: * projects/{project}/locations/{region}", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/backups/[^/]+$", + "required": true, + "type": "string" + }, + "requestId": { + "description": "Optional. An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. The server will guarantee that for at least 60 minutes since the first request. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", + "location": "query", + "type": "string" + }, + "updateMask": { + "description": "Optional. Field mask is used to specify the fields to be overwritten in the Backup resource by the update. The fields specified in the update_mask are relative to the resource, not the full request. A field will be overwritten if it is in the mask. If the user does not provide a mask then all fields will be overwritten.", + "format": "google-fieldmask", + "location": "query", + "type": "string" + }, + "validateOnly": { + "description": "Optional. If set, the backend validates the request, but doesn't actually execute it.", + "location": "query", + "type": "boolean" + } + }, + "path": "v1beta/{+name}", + "request": { + "$ref": "Backup" + }, + "response": { + "$ref": "Operation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + } + } + }, + "clusters": { + "methods": { + "create": { + "description": "Creates a new Cluster in a given project and location.", + "flatPath": "v1beta/projects/{projectsId}/locations/{locationsId}/clusters", + "httpMethod": "POST", + "id": "alloydb.projects.locations.clusters.create", + "parameterOrder": [ + "parent" + ], + "parameters": { + "clusterId": { + "description": "Required. ID of the requesting object.", + "location": "query", + "type": "string" + }, + "parent": { + "description": "Required. The location of the new cluster. For the required format, see the comment on the Cluster.name field.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+$", + "required": true, + "type": "string" + }, + "requestId": { + "description": "Optional. An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. The server will guarantee that for at least 60 minutes since the first request. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", + "location": "query", + "type": "string" + }, + "validateOnly": { + "description": "Optional. If set, performs request validation (e.g. permission checks and any other type of validation), but do not actually execute the create request.", + "location": "query", + "type": "boolean" + } + }, + "path": "v1beta/{+parent}/clusters", + "request": { + "$ref": "Cluster" + }, + "response": { + "$ref": "Operation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "createsecondary": { + "description": "Creates a cluster of type SECONDARY in the given location using the primary cluster as the source.", + "flatPath": "v1beta/projects/{projectsId}/locations/{locationsId}/clusters:createsecondary", + "httpMethod": "POST", + "id": "alloydb.projects.locations.clusters.createsecondary", + "parameterOrder": [ + "parent" + ], + "parameters": { + "clusterId": { + "description": "Required. ID of the requesting object (the secondary cluster).", + "location": "query", + "type": "string" + }, + "parent": { + "description": "Required. The location of the new cluster. For the required format, see the comment on the Cluster.name field.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+$", + "required": true, + "type": "string" + }, + "requestId": { + "description": "Optional. An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. The server will guarantee that for at least 60 minutes since the first request. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", + "location": "query", + "type": "string" + }, + "validateOnly": { + "description": "Optional. If set, performs request validation (e.g. permission checks and any other type of validation), but do not actually execute the create request.", + "location": "query", + "type": "boolean" + } + }, + "path": "v1beta/{+parent}/clusters:createsecondary", + "request": { + "$ref": "Cluster" + }, + "response": { + "$ref": "Operation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "delete": { + "description": "Deletes a single Cluster.", + "flatPath": "v1beta/projects/{projectsId}/locations/{locationsId}/clusters/{clustersId}", + "httpMethod": "DELETE", + "id": "alloydb.projects.locations.clusters.delete", + "parameterOrder": [ + "name" + ], + "parameters": { + "etag": { + "description": "Optional. The current etag of the Cluster. If an etag is provided and does not match the current etag of the Cluster, deletion will be blocked and an ABORTED error will be returned.", + "location": "query", + "type": "string" + }, + "force": { + "description": "Optional. Whether to cascade delete child instances for given cluster.", + "location": "query", + "type": "boolean" + }, + "name": { + "description": "Required. The name of the resource. For the required format, see the comment on the Cluster.name field.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/clusters/[^/]+$", + "required": true, + "type": "string" + }, + "requestId": { + "description": "Optional. An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. The server will guarantee that for at least 60 minutes after the first request. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", + "location": "query", + "type": "string" + }, + "validateOnly": { + "description": "Optional. If set, performs request validation (e.g. permission checks and any other type of validation), but do not actually execute the delete.", + "location": "query", + "type": "boolean" + } + }, + "path": "v1beta/{+name}", + "response": { + "$ref": "Operation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "generateClientCertificate": { + "description": "Generate a client certificate signed by a Cluster CA. The sole purpose of this endpoint is to support AlloyDB connectors and the Auth Proxy client. The endpoint's behavior is subject to change without notice, so do not rely on its behavior remaining constant. Future changes will not break AlloyDB connectors or the Auth Proxy client.", + "flatPath": "v1beta/projects/{projectsId}/locations/{locationsId}/clusters/{clustersId}:generateClientCertificate", + "httpMethod": "POST", + "id": "alloydb.projects.locations.clusters.generateClientCertificate", + "parameterOrder": [ + "parent" + ], + "parameters": { + "parent": { + "description": "Required. The name of the parent resource. The required format is: * projects/{project}/locations/{location}/clusters/{cluster}", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/clusters/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1beta/{+parent}:generateClientCertificate", + "request": { + "$ref": "GenerateClientCertificateRequest" + }, + "response": { + "$ref": "GenerateClientCertificateResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "get": { + "description": "Gets details of a single Cluster.", + "flatPath": "v1beta/projects/{projectsId}/locations/{locationsId}/clusters/{clustersId}", + "httpMethod": "GET", + "id": "alloydb.projects.locations.clusters.get", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Required. The name of the resource. For the required format, see the comment on the Cluster.name field.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/clusters/[^/]+$", + "required": true, + "type": "string" + }, + "view": { + "description": "Optional. The view of the cluster to return. Returns all default fields if not set.", + "enum": [ + "CLUSTER_VIEW_UNSPECIFIED", + "CLUSTER_VIEW_BASIC", + "CLUSTER_VIEW_CONTINUOUS_BACKUP" + ], + "enumDescriptions": [ + "CLUSTER_VIEW_UNSPECIFIED Not specified, equivalent to BASIC.", + "BASIC server responses include all the relevant cluster details, excluding Cluster.ContinuousBackupInfo.EarliestRestorableTime and other view-specific fields. The default value.", + "CONTINUOUS_BACKUP response returns all the fields from BASIC plus the earliest restorable time if continuous backups are enabled. May increase latency." + ], + "location": "query", + "type": "string" + } + }, + "path": "v1beta/{+name}", + "response": { + "$ref": "Cluster" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "list": { + "description": "Lists Clusters in a given project and location.", + "flatPath": "v1beta/projects/{projectsId}/locations/{locationsId}/clusters", + "httpMethod": "GET", + "id": "alloydb.projects.locations.clusters.list", + "parameterOrder": [ + "parent" + ], + "parameters": { + "filter": { + "description": "Optional. Filtering results", + "location": "query", + "type": "string" + }, + "orderBy": { + "description": "Optional. Hint for how to order the results", + "location": "query", + "type": "string" + }, + "pageSize": { + "description": "Optional. Requested page size. Server may return fewer items than requested. If unspecified, server will pick an appropriate default.", + "format": "int32", + "location": "query", + "type": "integer" + }, + "pageToken": { + "description": "A token identifying a page of results the server should return.", + "location": "query", + "type": "string" + }, + "parent": { + "description": "Required. The name of the parent resource. For the required format, see the comment on the Cluster.name field. Additionally, you can perform an aggregated list operation by specifying a value with the following format: * projects/{project}/locations/-", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1beta/{+parent}/clusters", + "response": { + "$ref": "ListClustersResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "patch": { + "description": "Updates the parameters of a single Cluster.", + "flatPath": "v1beta/projects/{projectsId}/locations/{locationsId}/clusters/{clustersId}", + "httpMethod": "PATCH", + "id": "alloydb.projects.locations.clusters.patch", + "parameterOrder": [ + "name" + ], + "parameters": { + "allowMissing": { + "description": "Optional. If set to true, update succeeds even if cluster is not found. In that case, a new cluster is created and `update_mask` is ignored.", + "location": "query", + "type": "boolean" + }, + "name": { + "description": "Output only. The name of the cluster resource with the format: * projects/{project}/locations/{region}/clusters/{cluster_id} where the cluster ID segment should satisfy the regex expression `[a-z0-9-]+`. For more details see https://google.aip.dev/122. The prefix of the cluster resource name is the name of the parent resource: * projects/{project}/locations/{region}", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/clusters/[^/]+$", + "required": true, + "type": "string" + }, + "requestId": { + "description": "Optional. An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. The server will guarantee that for at least 60 minutes since the first request. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", + "location": "query", + "type": "string" + }, + "updateMask": { + "description": "Optional. Field mask is used to specify the fields to be overwritten in the Cluster resource by the update. The fields specified in the update_mask are relative to the resource, not the full request. A field will be overwritten if it is in the mask. If the user does not provide a mask then all fields will be overwritten.", + "format": "google-fieldmask", + "location": "query", + "type": "string" + }, + "validateOnly": { + "description": "Optional. If set, performs request validation (e.g. permission checks and any other type of validation), but do not actually execute the update request.", + "location": "query", + "type": "boolean" + } + }, + "path": "v1beta/{+name}", + "request": { + "$ref": "Cluster" + }, + "response": { + "$ref": "Operation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "promote": { + "description": "Promotes a SECONDARY cluster. This turns down replication from the PRIMARY cluster and promotes a secondary cluster into its own standalone cluster. Imperative only.", + "flatPath": "v1beta/projects/{projectsId}/locations/{locationsId}/clusters/{clustersId}:promote", + "httpMethod": "POST", + "id": "alloydb.projects.locations.clusters.promote", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Required. The name of the resource. For the required format, see the comment on the Cluster.name field", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/clusters/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1beta/{+name}:promote", + "request": { + "$ref": "PromoteClusterRequest" + }, + "response": { + "$ref": "Operation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "restore": { + "description": "Creates a new Cluster in a given project and location, with a volume restored from the provided source, either a backup ID or a point-in-time and a source cluster.", + "flatPath": "v1beta/projects/{projectsId}/locations/{locationsId}/clusters:restore", + "httpMethod": "POST", + "id": "alloydb.projects.locations.clusters.restore", + "parameterOrder": [ + "parent" + ], + "parameters": { + "parent": { + "description": "Required. The name of the parent resource. For the required format, see the comment on the Cluster.name field.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1beta/{+parent}/clusters:restore", + "request": { + "$ref": "RestoreClusterRequest" + }, + "response": { + "$ref": "Operation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + } + }, + "resources": { + "instances": { + "methods": { + "create": { + "description": "Creates a new Instance in a given project and location.", + "flatPath": "v1beta/projects/{projectsId}/locations/{locationsId}/clusters/{clustersId}/instances", + "httpMethod": "POST", + "id": "alloydb.projects.locations.clusters.instances.create", + "parameterOrder": [ + "parent" + ], + "parameters": { + "instanceId": { + "description": "Required. ID of the requesting object.", + "location": "query", + "type": "string" + }, + "parent": { + "description": "Required. The name of the parent resource. For the required format, see the comment on the Instance.name field.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/clusters/[^/]+$", + "required": true, + "type": "string" + }, + "requestId": { + "description": "Optional. An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. The server will guarantee that for at least 60 minutes since the first request. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", + "location": "query", + "type": "string" + }, + "validateOnly": { + "description": "Optional. If set, performs request validation (e.g. permission checks and any other type of validation), but do not actually execute the create request.", + "location": "query", + "type": "boolean" + } + }, + "path": "v1beta/{+parent}/instances", + "request": { + "$ref": "Instance" + }, + "response": { + "$ref": "Operation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "createsecondary": { + "description": "Creates a new SECONDARY Instance in a given project and location.", + "flatPath": "v1beta/projects/{projectsId}/locations/{locationsId}/clusters/{clustersId}/instances:createsecondary", + "httpMethod": "POST", + "id": "alloydb.projects.locations.clusters.instances.createsecondary", + "parameterOrder": [ + "parent" + ], + "parameters": { + "instanceId": { + "description": "Required. ID of the requesting object.", + "location": "query", + "type": "string" + }, + "parent": { + "description": "Required. The name of the parent resource. For the required format, see the comment on the Instance.name field.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/clusters/[^/]+$", + "required": true, + "type": "string" + }, + "requestId": { + "description": "Optional. An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. The server will guarantee that for at least 60 minutes since the first request. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", + "location": "query", + "type": "string" + }, + "validateOnly": { + "description": "Optional. If set, performs request validation (e.g. permission checks and any other type of validation), but do not actually execute the create request.", + "location": "query", + "type": "boolean" + } + }, + "path": "v1beta/{+parent}/instances:createsecondary", + "request": { + "$ref": "Instance" + }, + "response": { + "$ref": "Operation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "delete": { + "description": "Deletes a single Instance.", + "flatPath": "v1beta/projects/{projectsId}/locations/{locationsId}/clusters/{clustersId}/instances/{instancesId}", + "httpMethod": "DELETE", + "id": "alloydb.projects.locations.clusters.instances.delete", + "parameterOrder": [ + "name" + ], + "parameters": { + "etag": { + "description": "Optional. The current etag of the Instance. If an etag is provided and does not match the current etag of the Instance, deletion will be blocked and an ABORTED error will be returned.", + "location": "query", + "type": "string" + }, + "name": { + "description": "Required. The name of the resource. For the required format, see the comment on the Instance.name field.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/clusters/[^/]+/instances/[^/]+$", + "required": true, + "type": "string" + }, + "requestId": { + "description": "Optional. An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. The server will guarantee that for at least 60 minutes after the first request. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", + "location": "query", + "type": "string" + }, + "validateOnly": { + "description": "Optional. If set, performs request validation (e.g. permission checks and any other type of validation), but do not actually execute the delete.", + "location": "query", + "type": "boolean" + } + }, + "path": "v1beta/{+name}", + "response": { + "$ref": "Operation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "failover": { + "description": "Forces a Failover for a highly available instance. Failover promotes the HA standby instance as the new primary. Imperative only.", + "flatPath": "v1beta/projects/{projectsId}/locations/{locationsId}/clusters/{clustersId}/instances/{instancesId}:failover", + "httpMethod": "POST", + "id": "alloydb.projects.locations.clusters.instances.failover", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Required. The name of the resource. For the required format, see the comment on the Instance.name field.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/clusters/[^/]+/instances/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1beta/{+name}:failover", + "request": { + "$ref": "FailoverInstanceRequest" + }, + "response": { + "$ref": "Operation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "get": { + "description": "Gets details of a single Instance.", + "flatPath": "v1beta/projects/{projectsId}/locations/{locationsId}/clusters/{clustersId}/instances/{instancesId}", + "httpMethod": "GET", + "id": "alloydb.projects.locations.clusters.instances.get", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Required. The name of the resource. For the required format, see the comment on the Instance.name field.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/clusters/[^/]+/instances/[^/]+$", + "required": true, + "type": "string" + }, + "view": { + "description": "The view of the instance to return.", + "enum": [ + "INSTANCE_VIEW_UNSPECIFIED", + "INSTANCE_VIEW_BASIC", + "INSTANCE_VIEW_FULL" + ], + "enumDescriptions": [ + "INSTANCE_VIEW_UNSPECIFIED Not specified, equivalent to BASIC.", + "BASIC server responses for a primary or read instance include all the relevant instance details, excluding the details of each node in the instance. The default value.", + "FULL response is equivalent to BASIC for primary instance (for now). For read pool instance, this includes details of each node in the pool." + ], + "location": "query", + "type": "string" + } + }, + "path": "v1beta/{+name}", + "response": { + "$ref": "Instance" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "getConnectionInfo": { + "description": "Get instance metadata used for a connection.", + "flatPath": "v1beta/projects/{projectsId}/locations/{locationsId}/clusters/{clustersId}/instances/{instancesId}/connectionInfo", + "httpMethod": "GET", + "id": "alloydb.projects.locations.clusters.instances.getConnectionInfo", + "parameterOrder": [ + "parent" + ], + "parameters": { + "parent": { + "description": "Required. The name of the parent resource. The required format is: projects/{project}/locations/{location}/clusters/{cluster}/instances/{instance}", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/clusters/[^/]+/instances/[^/]+$", + "required": true, + "type": "string" + }, + "requestId": { + "description": "Optional. An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. The server will guarantee that for at least 60 minutes after the first request. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", + "location": "query", + "type": "string" + } + }, + "path": "v1beta/{+parent}/connectionInfo", + "response": { + "$ref": "ConnectionInfo" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "injectFault": { + "description": "Injects fault in an instance. Imperative only.", + "flatPath": "v1beta/projects/{projectsId}/locations/{locationsId}/clusters/{clustersId}/instances/{instancesId}:injectFault", + "httpMethod": "POST", + "id": "alloydb.projects.locations.clusters.instances.injectFault", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Required. The name of the resource. For the required format, see the comment on the Instance.name field.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/clusters/[^/]+/instances/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1beta/{+name}:injectFault", + "request": { + "$ref": "InjectFaultRequest" + }, + "response": { + "$ref": "Operation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "list": { + "description": "Lists Instances in a given project and location.", + "flatPath": "v1beta/projects/{projectsId}/locations/{locationsId}/clusters/{clustersId}/instances", + "httpMethod": "GET", + "id": "alloydb.projects.locations.clusters.instances.list", + "parameterOrder": [ + "parent" + ], + "parameters": { + "filter": { + "description": "Optional. Filtering results", + "location": "query", + "type": "string" + }, + "orderBy": { + "description": "Optional. Hint for how to order the results", + "location": "query", + "type": "string" + }, + "pageSize": { + "description": "Optional. Requested page size. Server may return fewer items than requested. If unspecified, server will pick an appropriate default.", + "format": "int32", + "location": "query", + "type": "integer" + }, + "pageToken": { + "description": "A token identifying a page of results the server should return.", + "location": "query", + "type": "string" + }, + "parent": { + "description": "Required. The name of the parent resource. For the required format, see the comment on the Instance.name field. Additionally, you can perform an aggregated list operation by specifying a value with one of the following formats: * projects/{project}/locations/-/clusters/- * projects/{project}/locations/{region}/clusters/-", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/clusters/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1beta/{+parent}/instances", + "response": { + "$ref": "ListInstancesResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "patch": { + "description": "Updates the parameters of a single Instance.", + "flatPath": "v1beta/projects/{projectsId}/locations/{locationsId}/clusters/{clustersId}/instances/{instancesId}", + "httpMethod": "PATCH", + "id": "alloydb.projects.locations.clusters.instances.patch", + "parameterOrder": [ + "name" + ], + "parameters": { + "allowMissing": { + "description": "Optional. If set to true, update succeeds even if instance is not found. In that case, a new instance is created and `update_mask` is ignored.", + "location": "query", + "type": "boolean" + }, + "name": { + "description": "Output only. The name of the instance resource with the format: * projects/{project}/locations/{region}/clusters/{cluster_id}/instances/{instance_id} where the cluster and instance ID segments should satisfy the regex expression `[a-z]([a-z0-9-]{0,61}[a-z0-9])?`, e.g. 1-63 characters of lowercase letters, numbers, and dashes, starting with a letter, and ending with a letter or number. For more details see https://google.aip.dev/122. The prefix of the instance resource name is the name of the parent resource: * projects/{project}/locations/{region}/clusters/{cluster_id}", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/clusters/[^/]+/instances/[^/]+$", + "required": true, + "type": "string" + }, + "requestId": { + "description": "Optional. An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. The server will guarantee that for at least 60 minutes since the first request. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", + "location": "query", + "type": "string" + }, + "updateMask": { + "description": "Optional. Field mask is used to specify the fields to be overwritten in the Instance resource by the update. The fields specified in the update_mask are relative to the resource, not the full request. A field will be overwritten if it is in the mask. If the user does not provide a mask then all fields will be overwritten.", + "format": "google-fieldmask", + "location": "query", + "type": "string" + }, + "validateOnly": { + "description": "Optional. If set, performs request validation (e.g. permission checks and any other type of validation), but do not actually execute the update request.", + "location": "query", + "type": "boolean" + } + }, + "path": "v1beta/{+name}", + "request": { + "$ref": "Instance" + }, + "response": { + "$ref": "Operation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "restart": { + "description": "Restart an Instance in a cluster. Imperative only.", + "flatPath": "v1beta/projects/{projectsId}/locations/{locationsId}/clusters/{clustersId}/instances/{instancesId}:restart", + "httpMethod": "POST", + "id": "alloydb.projects.locations.clusters.instances.restart", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Required. The name of the resource. For the required format, see the comment on the Instance.name field.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/clusters/[^/]+/instances/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1beta/{+name}:restart", + "request": { + "$ref": "RestartInstanceRequest" + }, + "response": { + "$ref": "Operation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + } + } + }, + "users": { + "methods": { + "create": { + "description": "Creates a new User in a given project, location, and cluster.", + "flatPath": "v1beta/projects/{projectsId}/locations/{locationsId}/clusters/{clustersId}/users", + "httpMethod": "POST", + "id": "alloydb.projects.locations.clusters.users.create", + "parameterOrder": [ + "parent" + ], + "parameters": { + "parent": { + "description": "Required. Value for parent.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/clusters/[^/]+$", + "required": true, + "type": "string" + }, + "requestId": { + "description": "Optional. An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. The server will guarantee that for at least 60 minutes since the first request. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", + "location": "query", + "type": "string" + }, + "userId": { + "description": "Required. ID of the requesting object.", + "location": "query", + "type": "string" + }, + "validateOnly": { + "description": "Optional. If set, the backend validates the request, but doesn't actually execute it.", + "location": "query", + "type": "boolean" + } + }, + "path": "v1beta/{+parent}/users", + "request": { + "$ref": "User" + }, + "response": { + "$ref": "User" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "delete": { + "description": "Deletes a single User.", + "flatPath": "v1beta/projects/{projectsId}/locations/{locationsId}/clusters/{clustersId}/users/{usersId}", + "httpMethod": "DELETE", + "id": "alloydb.projects.locations.clusters.users.delete", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Required. The name of the resource. For the required format, see the comment on the User.name field.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/clusters/[^/]+/users/[^/]+$", + "required": true, + "type": "string" + }, + "requestId": { + "description": "Optional. An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. The server will guarantee that for at least 60 minutes after the first request. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", + "location": "query", + "type": "string" + }, + "validateOnly": { + "description": "Optional. If set, the backend validates the request, but doesn't actually execute it.", + "location": "query", + "type": "boolean" + } + }, + "path": "v1beta/{+name}", + "response": { + "$ref": "Empty" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "get": { + "description": "Gets details of a single User.", + "flatPath": "v1beta/projects/{projectsId}/locations/{locationsId}/clusters/{clustersId}/users/{usersId}", + "httpMethod": "GET", + "id": "alloydb.projects.locations.clusters.users.get", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Required. The name of the resource. For the required format, see the comment on the User.name field.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/clusters/[^/]+/users/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1beta/{+name}", + "response": { + "$ref": "User" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "list": { + "description": "Lists Users in a given project and location.", + "flatPath": "v1beta/projects/{projectsId}/locations/{locationsId}/clusters/{clustersId}/users", + "httpMethod": "GET", + "id": "alloydb.projects.locations.clusters.users.list", + "parameterOrder": [ + "parent" + ], + "parameters": { + "filter": { + "description": "Optional. Filtering results", + "location": "query", + "type": "string" + }, + "orderBy": { + "description": "Optional. Hint for how to order the results", + "location": "query", + "type": "string" + }, + "pageSize": { + "description": "Optional. Requested page size. Server may return fewer items than requested. If unspecified, server will pick an appropriate default.", + "format": "int32", + "location": "query", + "type": "integer" + }, + "pageToken": { + "description": "Optional. A token identifying a page of results the server should return.", + "location": "query", + "type": "string" + }, + "parent": { + "description": "Required. Parent value for ListUsersRequest", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/clusters/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1beta/{+parent}/users", + "response": { + "$ref": "ListUsersResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "patch": { + "description": "Updates the parameters of a single User.", + "flatPath": "v1beta/projects/{projectsId}/locations/{locationsId}/clusters/{clustersId}/users/{usersId}", + "httpMethod": "PATCH", + "id": "alloydb.projects.locations.clusters.users.patch", + "parameterOrder": [ + "name" + ], + "parameters": { + "allowMissing": { + "description": "Optional. Allow missing fields in the update mask.", + "location": "query", + "type": "boolean" + }, + "name": { + "description": "Output only. Name of the resource in the form of projects/{project}/locations/{location}/cluster/{cluster}/users/{user}.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/clusters/[^/]+/users/[^/]+$", + "required": true, + "type": "string" + }, + "requestId": { + "description": "Optional. An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. The server will guarantee that for at least 60 minutes since the first request. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", + "location": "query", + "type": "string" + }, + "updateMask": { + "description": "Optional. Field mask is used to specify the fields to be overwritten in the User resource by the update. The fields specified in the update_mask are relative to the resource, not the full request. A field will be overwritten if it is in the mask. If the user does not provide a mask then all fields will be overwritten.", + "format": "google-fieldmask", + "location": "query", + "type": "string" + }, + "validateOnly": { + "description": "Optional. If set, the backend validates the request, but doesn't actually execute it.", + "location": "query", + "type": "boolean" + } + }, + "path": "v1beta/{+name}", + "request": { + "$ref": "User" + }, + "response": { + "$ref": "User" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + } + } + } + } + }, + "operations": { + "methods": { + "cancel": { + "description": "Starts asynchronous cancellation on a long-running operation. The server makes a best effort to cancel the operation, but success is not guaranteed. If the server doesn't support this method, it returns `google.rpc.Code.UNIMPLEMENTED`. Clients can use Operations.GetOperation or other methods to check whether the cancellation succeeded or whether the operation completed despite cancellation. On successful cancellation, the operation is not deleted; instead, it becomes an operation with an Operation.error value with a google.rpc.Status.code of 1, corresponding to `Code.CANCELLED`.", + "flatPath": "v1beta/projects/{projectsId}/locations/{locationsId}/operations/{operationsId}:cancel", + "httpMethod": "POST", + "id": "alloydb.projects.locations.operations.cancel", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "The name of the operation resource to be cancelled.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/operations/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1beta/{+name}:cancel", + "response": { + "$ref": "Empty" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "delete": { + "description": "Deletes a long-running operation. This method indicates that the client is no longer interested in the operation result. It does not cancel the operation. If the server doesn't support this method, it returns `google.rpc.Code.UNIMPLEMENTED`.", + "flatPath": "v1beta/projects/{projectsId}/locations/{locationsId}/operations/{operationsId}", + "httpMethod": "DELETE", + "id": "alloydb.projects.locations.operations.delete", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "The name of the operation resource to be deleted.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/operations/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1beta/{+name}", + "response": { + "$ref": "Empty" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "get": { + "description": "Gets the latest state of a long-running operation. Clients can use this method to poll the operation result at intervals as recommended by the API service.", + "flatPath": "v1beta/projects/{projectsId}/locations/{locationsId}/operations/{operationsId}", + "httpMethod": "GET", + "id": "alloydb.projects.locations.operations.get", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "The name of the operation resource.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/operations/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1beta/{+name}", + "response": { + "$ref": "Operation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "list": { + "description": "Lists operations that match the specified filter in the request. If the server doesn't support this method, it returns `UNIMPLEMENTED`.", + "flatPath": "v1beta/projects/{projectsId}/locations/{locationsId}/operations", + "httpMethod": "GET", + "id": "alloydb.projects.locations.operations.list", + "parameterOrder": [ + "name" + ], + "parameters": { + "filter": { + "description": "The standard list filter.", + "location": "query", + "type": "string" + }, + "name": { + "description": "The name of the operation's parent resource.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+$", + "required": true, + "type": "string" + }, + "pageSize": { + "description": "The standard list page size.", + "format": "int32", + "location": "query", + "type": "integer" + }, + "pageToken": { + "description": "The standard list page token.", + "location": "query", + "type": "string" + } + }, + "path": "v1beta/{+name}/operations", + "response": { + "$ref": "ListOperationsResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + } + } + }, + "supportedDatabaseFlags": { + "methods": { + "list": { + "description": "Lists SupportedDatabaseFlags for a given project and location.", + "flatPath": "v1beta/projects/{projectsId}/locations/{locationsId}/supportedDatabaseFlags", + "httpMethod": "GET", + "id": "alloydb.projects.locations.supportedDatabaseFlags.list", + "parameterOrder": [ + "parent" + ], + "parameters": { + "pageSize": { + "description": "Requested page size. Server may return fewer items than requested. If unspecified, server will pick an appropriate default.", + "format": "int32", + "location": "query", + "type": "integer" + }, + "pageToken": { + "description": "A token identifying a page of results the server should return.", + "location": "query", + "type": "string" + }, + "parent": { + "description": "Required. The name of the parent resource. The required format is: * projects/{project}/locations/{location} Regardless of the parent specified here, as long it is contains a valid project and location, the service will return a static list of supported flags resources. Note that we do not yet support region-specific flags.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1beta/{+parent}/supportedDatabaseFlags", + "response": { + "$ref": "ListSupportedDatabaseFlagsResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + } + } + } + } + } + } + } + }, + "revision": "20230821", + "rootUrl": "https://alloydb.googleapis.com/", + "schemas": { + "AutomatedBackupPolicy": { + "description": "Message describing the user-specified automated backup policy. All fields in the automated backup policy are optional. Defaults for each field are provided if they are not set.", + "id": "AutomatedBackupPolicy", + "properties": { + "backupWindow": { + "description": "The length of the time window during which a backup can be taken. If a backup does not succeed within this time window, it will be canceled and considered failed. The backup window must be at least 5 minutes long. There is no upper bound on the window. If not set, it defaults to 1 hour.", + "format": "google-duration", + "type": "string" + }, + "enabled": { + "description": "Whether automated automated backups are enabled. If not set, defaults to true.", + "type": "boolean" + }, + "encryptionConfig": { + "$ref": "EncryptionConfig", + "description": "Optional. The encryption config can be specified to encrypt the backups with a customer-managed encryption key (CMEK). When this field is not specified, the backup will then use default encryption scheme to protect the user data." + }, + "labels": { + "additionalProperties": { + "type": "string" + }, + "description": "Labels to apply to backups created using this configuration.", + "type": "object" + }, + "location": { + "description": "The location where the backup will be stored. Currently, the only supported option is to store the backup in the same region as the cluster. If empty, defaults to the region of the cluster.", + "type": "string" + }, + "quantityBasedRetention": { + "$ref": "QuantityBasedRetention", + "description": "Quantity-based Backup retention policy to retain recent backups." + }, + "timeBasedRetention": { + "$ref": "TimeBasedRetention", + "description": "Time-based Backup retention policy." + }, + "weeklySchedule": { + "$ref": "WeeklySchedule", + "description": "Weekly schedule for the Backup." + } + }, + "type": "object" + }, + "Backup": { + "description": "Message describing Backup object", + "id": "Backup", + "properties": { + "annotations": { + "additionalProperties": { + "type": "string" + }, + "description": "Annotations to allow client tools to store small amount of arbitrary data. This is distinct from labels. https://google.aip.dev/128", + "type": "object" + }, + "clusterName": { + "description": "Required. The full resource name of the backup source cluster (e.g., projects/{project}/locations/{region}/clusters/{cluster_id}).", + "type": "string" + }, + "clusterUid": { + "description": "Output only. The system-generated UID of the cluster which was used to create this resource.", + "readOnly": true, + "type": "string" + }, + "createTime": { + "description": "Output only. Create time stamp", + "format": "google-datetime", + "readOnly": true, + "type": "string" + }, + "databaseVersion": { + "description": "Output only. The database engine major version of the cluster this backup was created from. Any restored cluster created from this backup will have the same database version.", + "enum": [ + "DATABASE_VERSION_UNSPECIFIED", + "POSTGRES_13", + "POSTGRES_14", + "POSTGRES_15" + ], + "enumDeprecated": [ + false, + true, + false, + false + ], + "enumDescriptions": [ + "This is an unknown database version.", + "DEPRECATED - The database version is Postgres 13.", + "The database version is Postgres 14.", + "The database version is Postgres 15." + ], + "readOnly": true, + "type": "string" + }, + "deleteTime": { + "description": "Output only. Delete time stamp", + "format": "google-datetime", + "readOnly": true, + "type": "string" + }, + "description": { + "description": "User-provided description of the backup.", + "type": "string" + }, + "displayName": { + "description": "User-settable and human-readable display name for the Backup.", + "type": "string" + }, + "encryptionConfig": { + "$ref": "EncryptionConfig", + "description": "Optional. The encryption config can be specified to encrypt the backup with a customer-managed encryption key (CMEK). When this field is not specified, the backup will then use default encryption scheme to protect the user data." + }, + "encryptionInfo": { + "$ref": "EncryptionInfo", + "description": "Output only. The encryption information for the backup.", + "readOnly": true + }, + "etag": { + "description": "For Resource freshness validation (https://google.aip.dev/154)", + "type": "string" + }, + "expiryQuantity": { + "$ref": "QuantityBasedExpiry", + "description": "Output only. The QuantityBasedExpiry of the backup, specified by the backup's retention policy. Once the expiry quantity is over retention, the backup is eligible to be garbage collected.", + "readOnly": true + }, + "expiryTime": { + "description": "Output only. The time at which after the backup is eligible to be garbage collected. It is the duration specified by the backup's retention policy, added to the backup's create_time.", + "format": "google-datetime", + "readOnly": true, + "type": "string" + }, + "labels": { + "additionalProperties": { + "type": "string" + }, + "description": "Labels as key value pairs", + "type": "object" + }, + "name": { + "description": "Output only. The name of the backup resource with the format: * projects/{project}/locations/{region}/backups/{backup_id} where the cluster and backup ID segments should satisfy the regex expression `[a-z]([a-z0-9-]{0,61}[a-z0-9])?`, e.g. 1-63 characters of lowercase letters, numbers, and dashes, starting with a letter, and ending with a letter or number. For more details see https://google.aip.dev/122. The prefix of the backup resource name is the name of the parent resource: * projects/{project}/locations/{region}", + "readOnly": true, + "type": "string" + }, + "reconciling": { + "description": "Output only. Reconciling (https://google.aip.dev/128#reconciliation), if true, indicates that the service is actively updating the resource. This can happen due to user-triggered updates or system actions like failover or maintenance.", + "readOnly": true, + "type": "boolean" + }, + "sizeBytes": { + "description": "Output only. The size of the backup in bytes.", + "format": "int64", + "readOnly": true, + "type": "string" + }, + "state": { + "description": "Output only. The current state of the backup.", + "enum": [ + "STATE_UNSPECIFIED", + "READY", + "CREATING", + "FAILED", + "DELETING" + ], + "enumDescriptions": [ + "The state of the backup is unknown.", + "The backup is ready.", + "The backup is creating.", + "The backup failed.", + "The backup is being deleted." + ], + "readOnly": true, + "type": "string" + }, + "type": { + "description": "The backup type, which suggests the trigger for the backup.", + "enum": [ + "TYPE_UNSPECIFIED", + "ON_DEMAND", + "AUTOMATED", + "CONTINUOUS" + ], + "enumDescriptions": [ + "Backup Type is unknown.", + "ON_DEMAND backups that were triggered by the customer (e.g., not AUTOMATED).", + "AUTOMATED backups triggered by the automated backups scheduler pursuant to an automated backup policy.", + "CONTINUOUS backups triggered by the automated backups scheduler due to a continuous backup policy." + ], + "type": "string" + }, + "uid": { + "description": "Output only. The system-generated UID of the resource. The UID is assigned when the resource is created, and it is retained until it is deleted.", + "readOnly": true, + "type": "string" + }, + "updateTime": { + "description": "Output only. Update time stamp", + "format": "google-datetime", + "readOnly": true, + "type": "string" + } + }, + "type": "object" + }, + "BackupSource": { + "description": "Message describing a BackupSource.", + "id": "BackupSource", + "properties": { + "backupName": { + "description": "Required. The name of the backup resource with the format: * projects/{project}/locations/{region}/backups/{backup_id}", + "type": "string" + }, + "backupUid": { + "description": "Output only. The system-generated UID of the backup which was used to create this resource. The UID is generated when the backup is created, and it is retained until the backup is deleted.", + "readOnly": true, + "type": "string" + } + }, + "type": "object" + }, + "ClientConnectionConfig": { + "description": "Client connection configuration", + "id": "ClientConnectionConfig", + "properties": { + "requireConnectors": { + "description": "Optional. Configuration to enforce connectors only (ex: AuthProxy) connections to the database.", + "type": "boolean" + }, + "sslConfig": { + "$ref": "SslConfig", + "description": "Optional. SSL config option for this instance." + } + }, + "type": "object" + }, + "CloudControl2SharedOperationsReconciliationOperationMetadata": { + "description": "Operation metadata returned by the CLH during resource state reconciliation.", + "id": "CloudControl2SharedOperationsReconciliationOperationMetadata", + "properties": { + "deleteResource": { + "deprecated": true, + "description": "DEPRECATED. Use exclusive_action instead.", + "type": "boolean" + }, + "exclusiveAction": { + "description": "Excluisive action returned by the CLH.", + "enum": [ + "UNKNOWN_REPAIR_ACTION", + "DELETE", + "RETRY" + ], + "enumDeprecated": [ + false, + true, + false + ], + "enumDescriptions": [ + "Unknown repair action.", + "The resource has to be deleted. When using this bit, the CLH should fail the operation. DEPRECATED. Instead use DELETE_RESOURCE OperationSignal in SideChannel.", + "This resource could not be repaired but the repair should be tried again at a later time. This can happen if there is a dependency that needs to be resolved first- e.g. if a parent resource must be repaired before a child resource." + ], + "type": "string" + } + }, + "type": "object" + }, + "Cluster": { + "description": "A cluster is a collection of regional AlloyDB resources. It can include a primary instance and one or more read pool instances. All cluster resources share a storage layer, which scales as needed.", + "id": "Cluster", + "properties": { + "annotations": { + "additionalProperties": { + "type": "string" + }, + "description": "Annotations to allow client tools to store small amount of arbitrary data. This is distinct from labels. https://google.aip.dev/128", + "type": "object" + }, + "automatedBackupPolicy": { + "$ref": "AutomatedBackupPolicy", + "description": "The automated backup policy for this cluster. If no policy is provided then the default policy will be used. If backups are supported for the cluster, the default policy takes one backup a day, has a backup window of 1 hour, and retains backups for 14 days. For more information on the defaults, consult the documentation for the message type." + }, + "backupSource": { + "$ref": "BackupSource", + "description": "Output only. Cluster created from backup.", + "readOnly": true + }, + "clusterType": { + "description": "Output only. The type of the cluster. This is an output-only field and it's populated at the Cluster creation time or the Cluster promotion time. The cluster type is determined by which RPC was used to create the cluster (i.e. `CreateCluster` vs. `CreateSecondaryCluster`", + "enum": [ + "CLUSTER_TYPE_UNSPECIFIED", + "PRIMARY", + "SECONDARY" + ], + "enumDescriptions": [ + "The type of the cluster is unknown.", + "Primary cluster that support read and write operations.", + "Secondary cluster that is replicating from another region. This only supports read." + ], + "readOnly": true, + "type": "string" + }, + "continuousBackupConfig": { + "$ref": "ContinuousBackupConfig", + "description": "Optional. Continuous backup configuration for this cluster." + }, + "continuousBackupInfo": { + "$ref": "ContinuousBackupInfo", + "description": "Output only. Continuous backup properties for this cluster.", + "readOnly": true + }, + "createTime": { + "description": "Output only. Create time stamp", + "format": "google-datetime", + "readOnly": true, + "type": "string" + }, + "databaseVersion": { + "description": "Optional. The database engine major version. This is an optional field and it is populated at the Cluster creation time. If a database version is not supplied at cluster creation time, then a default database version will be used.", + "enum": [ + "DATABASE_VERSION_UNSPECIFIED", + "POSTGRES_13", + "POSTGRES_14", + "POSTGRES_15" + ], + "enumDeprecated": [ + false, + true, + false, + false + ], + "enumDescriptions": [ + "This is an unknown database version.", + "DEPRECATED - The database version is Postgres 13.", + "The database version is Postgres 14.", + "The database version is Postgres 15." + ], + "type": "string" + }, + "deleteTime": { + "description": "Output only. Delete time stamp", + "format": "google-datetime", + "readOnly": true, + "type": "string" + }, + "displayName": { + "description": "User-settable and human-readable display name for the Cluster.", + "type": "string" + }, + "encryptionConfig": { + "$ref": "EncryptionConfig", + "description": "Optional. The encryption config can be specified to encrypt the data disks and other persistent data resources of a cluster with a customer-managed encryption key (CMEK). When this field is not specified, the cluster will then use default encryption scheme to protect the user data." + }, + "encryptionInfo": { + "$ref": "EncryptionInfo", + "description": "Output only. The encryption information for the cluster.", + "readOnly": true + }, + "etag": { + "description": "For Resource freshness validation (https://google.aip.dev/154)", + "type": "string" + }, + "initialUser": { + "$ref": "UserPassword", + "description": "Input only. Initial user to setup during cluster creation. Required. If used in `RestoreCluster` this is ignored." + }, + "labels": { + "additionalProperties": { + "type": "string" + }, + "description": "Labels as key value pairs", + "type": "object" + }, + "migrationSource": { + "$ref": "MigrationSource", + "description": "Output only. Cluster created via DMS migration.", + "readOnly": true + }, + "name": { + "description": "Output only. The name of the cluster resource with the format: * projects/{project}/locations/{region}/clusters/{cluster_id} where the cluster ID segment should satisfy the regex expression `[a-z0-9-]+`. For more details see https://google.aip.dev/122. The prefix of the cluster resource name is the name of the parent resource: * projects/{project}/locations/{region}", + "readOnly": true, + "type": "string" + }, + "network": { + "deprecated": true, + "description": "Required. The resource link for the VPC network in which cluster resources are created and from which they are accessible via Private IP. The network must belong to the same project as the cluster. It is specified in the form: \"projects/{project}/global/networks/{network_id}\". This is required to create a cluster. It can be updated, but it cannot be removed. Deprecated, use network_config.network instead.", + "type": "string" + }, + "networkConfig": { + "$ref": "NetworkConfig" + }, + "primaryConfig": { + "$ref": "PrimaryConfig", + "description": "Output only. Cross Region replication config specific to PRIMARY cluster.", + "readOnly": true + }, + "reconciling": { + "description": "Output only. Reconciling (https://google.aip.dev/128#reconciliation). Set to true if the current state of Cluster does not match the user's intended state, and the service is actively updating the resource to reconcile them. This can happen due to user-triggered updates or system actions like failover or maintenance.", + "readOnly": true, + "type": "boolean" + }, + "secondaryConfig": { + "$ref": "SecondaryConfig", + "description": "Cross Region replication config specific to SECONDARY cluster." + }, + "sslConfig": { + "$ref": "SslConfig", + "deprecated": true, + "description": "SSL configuration for this AlloyDB cluster." + }, + "state": { + "description": "Output only. The current serving state of the cluster.", + "enum": [ + "STATE_UNSPECIFIED", + "READY", + "STOPPED", + "EMPTY", + "CREATING", + "DELETING", + "FAILED", + "BOOTSTRAPPING", + "MAINTENANCE", + "PROMOTING" + ], + "enumDescriptions": [ + "The state of the cluster is unknown.", + "The cluster is active and running.", + "The cluster is stopped. All instances in the cluster are stopped. Customers can start a stopped cluster at any point and all their instances will come back to life with same names and IP resources. In this state, customer pays for storage. Associated backups could also be present in a stopped cluster.", + "The cluster is empty and has no associated resources. All instances, associated storage and backups have been deleted.", + "The cluster is being created.", + "The cluster is being deleted.", + "The creation of the cluster failed.", + "The cluster is bootstrapping with data from some other source. Direct mutations to the cluster (e.g. adding read pool) are not allowed.", + "The cluster is under maintenance. AlloyDB regularly performs maintenance and upgrades on customer clusters. Updates on the cluster are not allowed while the cluster is in this state.", + "The cluster is being promoted." + ], + "readOnly": true, + "type": "string" + }, + "uid": { + "description": "Output only. The system-generated UID of the resource. The UID is assigned when the resource is created, and it is retained until it is deleted.", + "readOnly": true, + "type": "string" + }, + "updateTime": { + "description": "Output only. Update time stamp", + "format": "google-datetime", + "readOnly": true, + "type": "string" + } + }, + "type": "object" + }, + "ConnectionInfo": { + "description": "ConnectionInfo singleton resource. https://google.aip.dev/156", + "id": "ConnectionInfo", + "properties": { + "instanceUid": { + "description": "Output only. The unique ID of the Instance.", + "readOnly": true, + "type": "string" + }, + "ipAddress": { + "description": "Output only. The private network IP address for the Instance. This is the default IP for the instance and is always created (even if enable_public_ip is set). This is the connection endpoint for an end-user application.", + "readOnly": true, + "type": "string" + }, + "name": { + "description": "The name of the ConnectionInfo singleton resource, e.g.: projects/{project}/locations/{location}/clusters/*/instances/*/connectionInfo This field currently has no semantic meaning.", + "type": "string" + }, + "pemCertificateChain": { + "deprecated": true, + "description": "Output only. The pem-encoded chain that may be used to verify the X.509 certificate. Expected to be in issuer-to-root order according to RFC 5246.", + "items": { + "type": "string" + }, + "readOnly": true, + "type": "array" + } + }, + "type": "object" + }, + "ContinuousBackupConfig": { + "description": "ContinuousBackupConfig describes the continuous backups recovery configurations of a cluster.", + "id": "ContinuousBackupConfig", + "properties": { + "enabled": { + "description": "Whether ContinuousBackup is enabled.", + "type": "boolean" + }, + "encryptionConfig": { + "$ref": "EncryptionConfig", + "description": "The encryption config can be specified to encrypt the backups with a customer-managed encryption key (CMEK). When this field is not specified, the backup will then use default encryption scheme to protect the user data." + }, + "recoveryWindowDays": { + "description": "The number of days that are eligible to restore from using PITR. To support the entire recovery window, backups and logs are retained for one day more than the recovery window. If not set, defaults to 14 days.", + "format": "int32", + "type": "integer" + } + }, + "type": "object" + }, + "ContinuousBackupInfo": { + "description": "ContinuousBackupInfo describes the continuous backup properties of a cluster.", + "id": "ContinuousBackupInfo", + "properties": { + "earliestRestorableTime": { + "description": "Output only. The earliest restorable time that can be restored to. Output only field.", + "format": "google-datetime", + "readOnly": true, + "type": "string" + }, + "enabledTime": { + "description": "Output only. When ContinuousBackup was most recently enabled. Set to null if ContinuousBackup is not enabled.", + "format": "google-datetime", + "readOnly": true, + "type": "string" + }, + "encryptionInfo": { + "$ref": "EncryptionInfo", + "description": "Output only. The encryption information for the WALs and backups required for ContinuousBackup.", + "readOnly": true + }, + "schedule": { + "description": "Output only. Days of the week on which a continuous backup is taken. Output only field. Ignored if passed into the request.", + "items": { + "enum": [ + "DAY_OF_WEEK_UNSPECIFIED", + "MONDAY", + "TUESDAY", + "WEDNESDAY", + "THURSDAY", + "FRIDAY", + "SATURDAY", + "SUNDAY" + ], + "enumDescriptions": [ + "The day of the week is unspecified.", + "Monday", + "Tuesday", + "Wednesday", + "Thursday", + "Friday", + "Saturday", + "Sunday" + ], + "type": "string" + }, + "readOnly": true, + "type": "array" + } + }, + "type": "object" + }, + "ContinuousBackupSource": { + "description": "Message describing a ContinuousBackupSource.", + "id": "ContinuousBackupSource", + "properties": { + "cluster": { + "description": "Required. The source cluster from which to restore. This cluster must have continuous backup enabled for this operation to succeed. For the required format, see the comment on the Cluster.name field.", + "type": "string" + }, + "pointInTime": { + "description": "Required. The point in time to restore to.", + "format": "google-datetime", + "type": "string" + } + }, + "type": "object" + }, + "Empty": { + "description": "A generic empty message that you can re-use to avoid defining duplicated empty messages in your APIs. A typical example is to use it as the request or the response type of an API method. For instance: service Foo { rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty); }", + "id": "Empty", + "properties": {}, + "type": "object" + }, + "EncryptionConfig": { + "description": "EncryptionConfig describes the encryption config of a cluster or a backup that is encrypted with a CMEK (customer-managed encryption key).", + "id": "EncryptionConfig", + "properties": { + "kmsKeyName": { + "description": "The fully-qualified resource name of the KMS key. Each Cloud KMS key is regionalized and has the following format: projects/[PROJECT]/locations/[REGION]/keyRings/[RING]/cryptoKeys/[KEY_NAME]", + "type": "string" + } + }, + "type": "object" + }, + "EncryptionInfo": { + "description": "EncryptionInfo describes the encryption information of a cluster or a backup.", + "id": "EncryptionInfo", + "properties": { + "encryptionType": { + "description": "Output only. Type of encryption.", + "enum": [ + "TYPE_UNSPECIFIED", + "GOOGLE_DEFAULT_ENCRYPTION", + "CUSTOMER_MANAGED_ENCRYPTION" + ], + "enumDescriptions": [ + "Encryption type not specified. Defaults to GOOGLE_DEFAULT_ENCRYPTION.", + "The data is encrypted at rest with a key that is fully managed by Google. No key version will be populated. This is the default state.", + "The data is encrypted at rest with a key that is managed by the customer. KMS key versions will be populated." + ], + "readOnly": true, + "type": "string" + }, + "kmsKeyVersions": { + "description": "Output only. Cloud KMS key versions that are being used to protect the database or the backup.", + "items": { + "type": "string" + }, + "readOnly": true, + "type": "array" + } + }, + "type": "object" + }, + "FailoverInstanceRequest": { + "description": "Message for triggering failover on an Instance", + "id": "FailoverInstanceRequest", + "properties": { + "requestId": { + "description": "Optional. An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. The server will guarantee that for at least 60 minutes after the first request. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", + "type": "string" + }, + "validateOnly": { + "description": "Optional. If set, performs request validation (e.g. permission checks and any other type of validation), but do not actually execute the failover.", + "type": "boolean" + } + }, + "type": "object" + }, + "GenerateClientCertificateRequest": { + "description": "Message for requests to generate a client certificate signed by the Cluster CA.", + "id": "GenerateClientCertificateRequest", + "properties": { + "certDuration": { + "description": "Optional. An optional hint to the endpoint to generate the client certificate with the requested duration. The duration can be from 1 hour to 24 hours. The endpoint may or may not honor the hint. If the hint is left unspecified or is not honored, then the endpoint will pick an appropriate default duration.", + "format": "google-duration", + "type": "string" + }, + "pemCsr": { + "deprecated": true, + "description": "Optional. A pem-encoded X.509 certificate signing request (CSR).", + "type": "string" + }, + "publicKey": { + "description": "Optional. The public key from the client.", + "type": "string" + }, + "requestId": { + "description": "Optional. An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. The server will guarantee that for at least 60 minutes after the first request. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", + "type": "string" + }, + "useMetadataExchange": { + "description": "Optional. An optional hint to the endpoint to generate a client ceritificate that can be used by AlloyDB connectors to exchange additional metadata with the server after TLS handshake.", + "type": "boolean" + } + }, + "type": "object" + }, + "GenerateClientCertificateResponse": { + "description": "Message returned by a GenerateClientCertificate operation.", + "id": "GenerateClientCertificateResponse", + "properties": { + "caCert": { + "description": "Optional. The pem-encoded cluster ca X.509 certificate.", + "type": "string" + }, + "pemCertificate": { + "description": "Output only. The pem-encoded, signed X.509 certificate.", + "readOnly": true, + "type": "string" + }, + "pemCertificateChain": { + "description": "Output only. The pem-encoded chain that may be used to verify the X.509 certificate. Expected to be in issuer-to-root order according to RFC 5246.", + "items": { + "type": "string" + }, + "readOnly": true, + "type": "array" + } + }, + "type": "object" + }, + "GoogleCloudLocationListLocationsResponse": { + "description": "The response message for Locations.ListLocations.", + "id": "GoogleCloudLocationListLocationsResponse", + "properties": { + "locations": { + "description": "A list of locations that matches the specified filter in the request.", + "items": { + "$ref": "GoogleCloudLocationLocation" + }, + "type": "array" + }, + "nextPageToken": { + "description": "The standard List next-page token.", + "type": "string" + } + }, + "type": "object" + }, + "GoogleCloudLocationLocation": { + "description": "A resource that represents a Google Cloud location.", + "id": "GoogleCloudLocationLocation", + "properties": { + "displayName": { + "description": "The friendly name for this location, typically a nearby city name. For example, \"Tokyo\".", + "type": "string" + }, + "labels": { + "additionalProperties": { + "type": "string" + }, + "description": "Cross-service attributes for the location. For example {\"cloud.googleapis.com/region\": \"us-east1\"}", + "type": "object" + }, + "locationId": { + "description": "The canonical id for this location. For example: `\"us-east1\"`.", + "type": "string" + }, + "metadata": { + "additionalProperties": { + "description": "Properties of the object. Contains field @type with type URL.", + "type": "any" + }, + "description": "Service-specific metadata. For example the available capacity at the given location.", + "type": "object" + }, + "name": { + "description": "Resource name for the location, which may vary between implementations. For example: `\"projects/example-project/locations/us-east1\"`", + "type": "string" + } + }, + "type": "object" + }, + "GoogleTypeTimeOfDay": { + "description": "Represents a time of day. The date and time zone are either not significant or are specified elsewhere. An API may choose to allow leap seconds. Related types are google.type.Date and `google.protobuf.Timestamp`.", + "id": "GoogleTypeTimeOfDay", + "properties": { + "hours": { + "description": "Hours of day in 24 hour format. Should be from 0 to 23. An API may choose to allow the value \"24:00:00\" for scenarios like business closing time.", + "format": "int32", + "type": "integer" + }, + "minutes": { + "description": "Minutes of hour of day. Must be from 0 to 59.", + "format": "int32", + "type": "integer" + }, + "nanos": { + "description": "Fractions of seconds in nanoseconds. Must be from 0 to 999,999,999.", + "format": "int32", + "type": "integer" + }, + "seconds": { + "description": "Seconds of minutes of the time. Must normally be from 0 to 59. An API may allow the value 60 if it allows leap-seconds.", + "format": "int32", + "type": "integer" + } + }, + "type": "object" + }, + "InjectFaultRequest": { + "description": "Message for triggering fault injection on an instance", + "id": "InjectFaultRequest", + "properties": { + "faultType": { + "description": "Required. The type of fault to be injected in an instance.", + "enum": [ + "FAULT_TYPE_UNSPECIFIED", + "STOP_VM" + ], + "enumDescriptions": [ + "The fault type is unknown.", + "Stop the VM" + ], + "type": "string" + }, + "requestId": { + "description": "Optional. An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. The server will guarantee that for at least 60 minutes after the first request. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", + "type": "string" + }, + "validateOnly": { + "description": "Optional. If set, performs request validation (e.g. permission checks and any other type of validation), but do not actually execute the fault injection.", + "type": "boolean" + } + }, + "type": "object" + }, + "Instance": { + "description": "An Instance is a computing unit that an end customer can connect to. It's the main unit of computing resources in AlloyDB.", + "id": "Instance", + "properties": { + "annotations": { + "additionalProperties": { + "type": "string" + }, + "description": "Annotations to allow client tools to store small amount of arbitrary data. This is distinct from labels. https://google.aip.dev/128", + "type": "object" + }, + "availabilityType": { + "description": "Availability type of an Instance. If empty, defaults to REGIONAL for primary instances. For read pools, availability_type is always UNSPECIFIED. Instances in the read pools are evenly distributed across available zones within the region (i.e. read pools with more than one node will have a node in at least two zones).", + "enum": [ + "AVAILABILITY_TYPE_UNSPECIFIED", + "ZONAL", + "REGIONAL" + ], + "enumDescriptions": [ + "This is an unknown Availability type.", + "Zonal available instance.", + "Regional (or Highly) available instance." + ], + "type": "string" + }, + "clientConnectionConfig": { + "$ref": "ClientConnectionConfig", + "description": "Optional. Client connection specific configurations" + }, + "createTime": { + "description": "Output only. Create time stamp", + "format": "google-datetime", + "readOnly": true, + "type": "string" + }, + "databaseFlags": { + "additionalProperties": { + "type": "string" + }, + "description": "Database flags. Set at instance level. * They are copied from primary instance on read instance creation. * Read instances can set new or override existing flags that are relevant for reads, e.g. for enabling columnar cache on a read instance. Flags set on read instance may or may not be present on primary. This is a list of \"key\": \"value\" pairs. \"key\": The name of the flag. These flags are passed at instance setup time, so include both server options and system variables for Postgres. Flags are specified with underscores, not hyphens. \"value\": The value of the flag. Booleans are set to **on** for true and **off** for false. This field must be omitted if the flag doesn't take a value.", + "type": "object" + }, + "deleteTime": { + "description": "Output only. Delete time stamp", + "format": "google-datetime", + "readOnly": true, + "type": "string" + }, + "displayName": { + "description": "User-settable and human-readable display name for the Instance.", + "type": "string" + }, + "etag": { + "description": "For Resource freshness validation (https://google.aip.dev/154)", + "type": "string" + }, + "gceZone": { + "description": "The Compute Engine zone that the instance should serve from, per https://cloud.google.com/compute/docs/regions-zones This can ONLY be specified for ZONAL instances. If present for a REGIONAL instance, an error will be thrown. If this is absent for a ZONAL instance, instance is created in a random zone with available capacity.", + "type": "string" + }, + "instanceType": { + "description": "Required. The type of the instance. Specified at creation time.", + "enum": [ + "INSTANCE_TYPE_UNSPECIFIED", + "PRIMARY", + "READ_POOL", + "SECONDARY" + ], + "enumDescriptions": [ + "The type of the instance is unknown.", + "PRIMARY instances support read and write operations.", + "READ POOL instances support read operations only. Each read pool instance consists of one or more homogeneous nodes. * Read pool of size 1 can only have zonal availability. * Read pools with node count of 2 or more can have regional availability (nodes are present in 2 or more zones in a region).", + "SECONDARY instances support read operations only. SECONDARY instance is a cross-region read replica" + ], + "type": "string" + }, + "ipAddress": { + "description": "Output only. The IP address for the Instance. This is the connection endpoint for an end-user application.", + "readOnly": true, + "type": "string" + }, + "labels": { + "additionalProperties": { + "type": "string" + }, + "description": "Labels as key value pairs", + "type": "object" + }, + "machineConfig": { + "$ref": "MachineConfig", + "description": "Configurations for the machines that host the underlying database engine." + }, + "name": { + "description": "Output only. The name of the instance resource with the format: * projects/{project}/locations/{region}/clusters/{cluster_id}/instances/{instance_id} where the cluster and instance ID segments should satisfy the regex expression `[a-z]([a-z0-9-]{0,61}[a-z0-9])?`, e.g. 1-63 characters of lowercase letters, numbers, and dashes, starting with a letter, and ending with a letter or number. For more details see https://google.aip.dev/122. The prefix of the instance resource name is the name of the parent resource: * projects/{project}/locations/{region}/clusters/{cluster_id}", + "readOnly": true, + "type": "string" + }, + "nodes": { + "description": "Output only. List of available read-only VMs in this instance, including the standby for a PRIMARY instance.", + "items": { + "$ref": "Node" + }, + "readOnly": true, + "type": "array" + }, + "queryInsightsConfig": { + "$ref": "QueryInsightsInstanceConfig", + "description": "Configuration for query insights." + }, + "readPoolConfig": { + "$ref": "ReadPoolConfig", + "description": "Read pool specific config." + }, + "reconciling": { + "description": "Output only. Reconciling (https://google.aip.dev/128#reconciliation). Set to true if the current state of Instance does not match the user's intended state, and the service is actively updating the resource to reconcile them. This can happen due to user-triggered updates or system actions like failover or maintenance.", + "readOnly": true, + "type": "boolean" + }, + "state": { + "description": "Output only. The current serving state of the instance.", + "enum": [ + "STATE_UNSPECIFIED", + "READY", + "STOPPED", + "CREATING", + "DELETING", + "MAINTENANCE", + "FAILED", + "BOOTSTRAPPING", + "PROMOTING" + ], + "enumDescriptions": [ + "The state of the instance is unknown.", + "The instance is active and running.", + "The instance is stopped. Instance name and IP resources are preserved.", + "The instance is being created.", + "The instance is being deleted.", + "The instance is down for maintenance.", + "The creation of the instance failed or a fatal error occurred during an operation on the instance. Note: Instances in this state would tried to be auto-repaired. And Customers should be able to restart, update or delete these instances.", + "Index 7 is used in the producer apis for ROLLED_BACK state. Keeping that index unused in case that state also needs to exposed via consumer apis in future. The instance has been configured to sync data from some other source.", + "The instance is being promoted." + ], + "readOnly": true, + "type": "string" + }, + "uid": { + "description": "Output only. The system-generated UID of the resource. The UID is assigned when the resource is created, and it is retained until it is deleted.", + "readOnly": true, + "type": "string" + }, + "updatePolicy": { + "$ref": "UpdatePolicy", + "description": "Update policy that will be applied during instance update. This field is not persisted when you update the instance. To use a non-default update policy, you must specify explicitly specify the value in each update request." + }, + "updateTime": { + "description": "Output only. Update time stamp", + "format": "google-datetime", + "readOnly": true, + "type": "string" + }, + "writableNode": { + "$ref": "Node", + "description": "Output only. This is set for the read-write VM of the PRIMARY instance only.", + "readOnly": true + } + }, + "type": "object" + }, + "IntegerRestrictions": { + "description": "Restrictions on INTEGER type values.", + "id": "IntegerRestrictions", + "properties": { + "maxValue": { + "description": "The maximum value that can be specified, if applicable.", + "format": "int64", + "type": "string" + }, + "minValue": { + "description": "The minimum value that can be specified, if applicable.", + "format": "int64", + "type": "string" + } + }, + "type": "object" + }, + "ListBackupsResponse": { + "description": "Message for response to listing Backups", + "id": "ListBackupsResponse", + "properties": { + "backups": { + "description": "The list of Backup", + "items": { + "$ref": "Backup" + }, + "type": "array" + }, + "nextPageToken": { + "description": "A token identifying a page of results the server should return.", + "type": "string" + }, + "unreachable": { + "description": "Locations that could not be reached.", + "items": { + "type": "string" + }, + "type": "array" + } + }, + "type": "object" + }, + "ListClustersResponse": { + "description": "Message for response to listing Clusters", + "id": "ListClustersResponse", + "properties": { + "clusters": { + "description": "The list of Cluster", + "items": { + "$ref": "Cluster" + }, + "type": "array" + }, + "nextPageToken": { + "description": "A token identifying a page of results the server should return.", + "type": "string" + }, + "unreachable": { + "description": "Locations that could not be reached.", + "items": { + "type": "string" + }, + "type": "array" + } + }, + "type": "object" + }, + "ListInstancesResponse": { + "description": "Message for response to listing Instances", + "id": "ListInstancesResponse", + "properties": { + "instances": { + "description": "The list of Instance", + "items": { + "$ref": "Instance" + }, + "type": "array" + }, + "nextPageToken": { + "description": "A token identifying a page of results the server should return.", + "type": "string" + }, + "unreachable": { + "description": "Locations that could not be reached.", + "items": { + "type": "string" + }, + "type": "array" + } + }, + "type": "object" + }, + "ListOperationsResponse": { + "description": "The response message for Operations.ListOperations.", + "id": "ListOperationsResponse", + "properties": { + "nextPageToken": { + "description": "The standard List next-page token.", + "type": "string" + }, + "operations": { + "description": "A list of operations that matches the specified filter in the request.", + "items": { + "$ref": "Operation" + }, + "type": "array" + } + }, + "type": "object" + }, + "ListSupportedDatabaseFlagsResponse": { + "description": "Message for response to listing SupportedDatabaseFlags.", + "id": "ListSupportedDatabaseFlagsResponse", + "properties": { + "nextPageToken": { + "description": "A token identifying a page of results the server should return.", + "type": "string" + }, + "supportedDatabaseFlags": { + "description": "The list of SupportedDatabaseFlags.", + "items": { + "$ref": "SupportedDatabaseFlag" + }, + "type": "array" + } + }, + "type": "object" + }, + "ListUsersResponse": { + "description": "Message for response to listing Users", + "id": "ListUsersResponse", + "properties": { + "nextPageToken": { + "description": "A token identifying a page of results the server should return.", + "type": "string" + }, + "unreachable": { + "description": "Locations that could not be reached.", + "items": { + "type": "string" + }, + "type": "array" + }, + "users": { + "description": "The list of User", + "items": { + "$ref": "User" + }, + "type": "array" + } + }, + "type": "object" + }, + "MachineConfig": { + "description": "MachineConfig describes the configuration of a machine.", + "id": "MachineConfig", + "properties": { + "cpuCount": { + "description": "The number of CPU's in the VM instance.", + "format": "int32", + "type": "integer" + } + }, + "type": "object" + }, + "MigrationSource": { + "description": "Subset of the source instance configuration that is available when reading the cluster resource.", + "id": "MigrationSource", + "properties": { + "hostPort": { + "description": "Output only. The host and port of the on-premises instance in host:port format", + "readOnly": true, + "type": "string" + }, + "referenceId": { + "description": "Output only. Place holder for the external source identifier(e.g DMS job name) that created the cluster.", + "readOnly": true, + "type": "string" + }, + "sourceType": { + "description": "Output only. Type of migration source.", + "enum": [ + "MIGRATION_SOURCE_TYPE_UNSPECIFIED", + "DMS" + ], + "enumDescriptions": [ + "Migration source is unknown.", + "DMS source means the cluster was created via DMS migration job." + ], + "readOnly": true, + "type": "string" + } + }, + "type": "object" + }, + "NetworkConfig": { + "description": "Metadata related to network configuration.", + "id": "NetworkConfig", + "properties": { + "allocatedIpRange": { + "description": "Optional. Name of the allocated IP range for the private IP AlloyDB cluster, for example: \"google-managed-services-default\". If set, the instance IPs for this cluster will be created in the allocated range. The range name must comply with RFC 1035. Specifically, the name must be 1-63 characters long and match the regular expression [a-z]([-a-z0-9]*[a-z0-9])?. Field name is intended to be consistent with CloudSQL.", + "type": "string" + }, + "network": { + "description": "Required. The resource link for the VPC network in which cluster resources are created and from which they are accessible via Private IP. The network must belong to the same project as the cluster. It is specified in the form: \"projects/{project_number}/global/networks/{network_id}\". This is required to create a cluster. It can be updated, but it cannot be removed.", + "type": "string" + } + }, + "type": "object" + }, + "Node": { + "description": "Details of a single node in the instance. Nodes in an AlloyDB instance are ephemereal, they can change during update, failover, autohealing and resize operations.", + "id": "Node", + "properties": { + "id": { + "description": "The identifier of the VM e.g. \"test-read-0601-407e52be-ms3l\".", + "type": "string" + }, + "ip": { + "description": "The private IP address of the VM e.g. \"10.57.0.34\".", + "type": "string" + }, + "state": { + "description": "Determined by state of the compute VM and postgres-service health. Compute VM state can have values listed in https://cloud.google.com/compute/docs/instances/instance-life-cycle and postgres-service health can have values: HEALTHY and UNHEALTHY.", + "type": "string" + }, + "zoneId": { + "description": "The Compute Engine zone of the VM e.g. \"us-central1-b\".", + "type": "string" + } + }, + "type": "object" + }, + "Operation": { + "description": "This resource represents a long-running operation that is the result of a network API call.", + "id": "Operation", + "properties": { + "done": { + "description": "If the value is `false`, it means the operation is still in progress. If `true`, the operation is completed, and either `error` or `response` is available.", + "type": "boolean" + }, + "error": { + "$ref": "Status", + "description": "The error result of the operation in case of failure or cancellation." + }, + "metadata": { + "additionalProperties": { + "description": "Properties of the object. Contains field @type with type URL.", + "type": "any" + }, + "description": "Service-specific metadata associated with the operation. It typically contains progress information and common metadata such as create time. Some services might not provide such metadata. Any method that returns a long-running operation should document the metadata type, if any.", + "type": "object" + }, + "name": { + "description": "The server-assigned name, which is only unique within the same service that originally returns it. If you use the default HTTP mapping, the `name` should be a resource name ending with `operations/{unique_id}`.", + "type": "string" + }, + "response": { + "additionalProperties": { + "description": "Properties of the object. Contains field @type with type URL.", + "type": "any" + }, + "description": "The normal, successful response of the operation. If the original method returns no data on success, such as `Delete`, the response is `google.protobuf.Empty`. If the original method is standard `Get`/`Create`/`Update`, the response should be the resource. For other methods, the response should have the type `XxxResponse`, where `Xxx` is the original method name. For example, if the original method name is `TakeSnapshot()`, the inferred response type is `TakeSnapshotResponse`.", + "type": "object" + } + }, + "type": "object" + }, + "OperationMetadata": { + "description": "Represents the metadata of the long-running operation.", + "id": "OperationMetadata", + "properties": { + "apiVersion": { + "description": "Output only. API version used to start the operation.", + "readOnly": true, + "type": "string" + }, + "createTime": { + "description": "Output only. The time the operation was created.", + "format": "google-datetime", + "readOnly": true, + "type": "string" + }, + "endTime": { + "description": "Output only. The time the operation finished running.", + "format": "google-datetime", + "readOnly": true, + "type": "string" + }, + "requestedCancellation": { + "description": "Output only. Identifies whether the user has requested cancellation of the operation. Operations that have successfully been cancelled have Operation.error value with a google.rpc.Status.code of 1, corresponding to `Code.CANCELLED`.", + "readOnly": true, + "type": "boolean" + }, + "statusMessage": { + "description": "Output only. Human-readable status of the operation, if any.", + "readOnly": true, + "type": "string" + }, + "target": { + "description": "Output only. Server-defined resource path for the target of the operation.", + "readOnly": true, + "type": "string" + }, + "verb": { + "description": "Output only. Name of the verb executed by the operation.", + "readOnly": true, + "type": "string" + } + }, + "type": "object" + }, + "PrimaryConfig": { + "description": "Configuration for the primary cluster. It has the list of clusters that are replicating from this cluster. This should be set if and only if the cluster is of type PRIMARY.", + "id": "PrimaryConfig", + "properties": { + "secondaryClusterNames": { + "description": "Output only. Names of the clusters that are replicating from this cluster.", + "items": { + "type": "string" + }, + "readOnly": true, + "type": "array" + } + }, + "type": "object" + }, + "PromoteClusterRequest": { + "description": "Message for promoting a Cluster", + "id": "PromoteClusterRequest", + "properties": { + "etag": { + "description": "Optional. The current etag of the Cluster. If an etag is provided and does not match the current etag of the Cluster, deletion will be blocked and an ABORTED error will be returned.", + "type": "string" + }, + "requestId": { + "description": "Optional. An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. The server will guarantee that for at least 60 minutes after the first request. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", + "type": "string" + }, + "validateOnly": { + "description": "Optional. If set, performs request validation (e.g. permission checks and any other type of validation), but do not actually execute the delete.", + "type": "boolean" + } + }, + "type": "object" + }, + "QuantityBasedExpiry": { + "description": "A backup's position in a quantity-based retention queue, of backups with the same source cluster and type, with length, retention, specified by the backup's retention policy. Once the position is greater than the retention, the backup is eligible to be garbage collected. Example: 5 backups from the same source cluster and type with a quantity-based retention of 3 and denoted by backup_id (position, retention). Safe: backup_5 (1, 3), backup_4, (2, 3), backup_3 (3, 3). Awaiting garbage collection: backup_2 (4, 3), backup_1 (5, 3)", + "id": "QuantityBasedExpiry", + "properties": { + "retentionCount": { + "description": "Output only. The backup's position among its backups with the same source cluster and type, by descending chronological order create time(i.e. newest first).", + "format": "int32", + "readOnly": true, + "type": "integer" + }, + "totalRetentionCount": { + "description": "Output only. The length of the quantity-based queue, specified by the backup's retention policy.", + "format": "int32", + "readOnly": true, + "type": "integer" + } + }, + "type": "object" + }, + "QuantityBasedRetention": { + "description": "A quantity based policy specifies that a certain number of the most recent successful backups should be retained.", + "id": "QuantityBasedRetention", + "properties": { + "count": { + "description": "The number of backups to retain.", + "format": "int32", + "type": "integer" + } + }, + "type": "object" + }, + "QueryInsightsInstanceConfig": { + "description": "QueryInsights Instance specific configuration.", + "id": "QueryInsightsInstanceConfig", + "properties": { + "queryPlansPerMinute": { + "description": "Number of query execution plans captured by Insights per minute for all queries combined. The default value is 5. Any integer between 0 and 20 is considered valid.", + "format": "uint32", + "type": "integer" + }, + "queryStringLength": { + "description": "Query string length. The default value is 1024. Any integer between 256 and 4500 is considered valid.", + "format": "uint32", + "type": "integer" + }, + "recordApplicationTags": { + "description": "Record application tags for an instance. This flag is turned \"on\" by default.", + "type": "boolean" + }, + "recordClientAddress": { + "description": "Record client address for an instance. Client address is PII information. This flag is turned \"on\" by default.", + "type": "boolean" + } + }, + "type": "object" + }, + "ReadPoolConfig": { + "description": "Configuration for a read pool instance.", + "id": "ReadPoolConfig", + "properties": { + "nodeCount": { + "description": "Read capacity, i.e. number of nodes in a read pool instance.", + "format": "int32", + "type": "integer" + } + }, + "type": "object" + }, + "RestartInstanceRequest": { + "id": "RestartInstanceRequest", + "properties": { + "requestId": { + "description": "Optional. An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. The server will guarantee that for at least 60 minutes after the first request. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", + "type": "string" + }, + "validateOnly": { + "description": "Optional. If set, performs request validation (e.g. permission checks and any other type of validation), but do not actually execute the restart.", + "type": "boolean" + } + }, + "type": "object" + }, + "RestoreClusterRequest": { + "description": "Message for restoring a Cluster from a backup or another cluster at a given point in time.", + "id": "RestoreClusterRequest", + "properties": { + "backupSource": { + "$ref": "BackupSource", + "description": "Backup source." + }, + "cluster": { + "$ref": "Cluster", + "description": "Required. The resource being created" + }, + "clusterId": { + "description": "Required. ID of the requesting object.", + "type": "string" + }, + "continuousBackupSource": { + "$ref": "ContinuousBackupSource", + "description": "ContinuousBackup source. Continuous backup needs to be enabled in the source cluster for this operation to succeed." + }, + "requestId": { + "description": "Optional. An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. The server will guarantee that for at least 60 minutes since the first request. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", + "type": "string" + }, + "validateOnly": { + "description": "Optional. If set, performs request validation (e.g. permission checks and any other type of validation), but do not actually execute the import request.", + "type": "boolean" + } + }, + "type": "object" + }, + "SecondaryConfig": { + "description": "Configuration information for the secondary cluster. This should be set if and only if the cluster is of type SECONDARY.", + "id": "SecondaryConfig", + "properties": { + "primaryClusterName": { + "description": "The name of the primary cluster name with the format: * projects/{project}/locations/{region}/clusters/{cluster_id}", + "type": "string" + } + }, + "type": "object" + }, + "SslConfig": { + "description": "SSL configuration.", + "id": "SslConfig", + "properties": { + "caSource": { + "description": "Optional. Certificate Authority (CA) source. Only CA_SOURCE_MANAGED is supported currently, and is the default value.", + "enum": [ + "CA_SOURCE_UNSPECIFIED", + "CA_SOURCE_MANAGED" + ], + "enumDescriptions": [ + "Certificate Authority (CA) source not specified. Defaults to CA_SOURCE_MANAGED.", + "Certificate Authority (CA) managed by the AlloyDB Cluster." + ], + "type": "string" + }, + "sslMode": { + "description": "Optional. SSL mode. Specifies client-server SSL/TLS connection behavior.", + "enum": [ + "SSL_MODE_UNSPECIFIED", + "SSL_MODE_ALLOW", + "SSL_MODE_REQUIRE", + "SSL_MODE_VERIFY_CA", + "ALLOW_UNENCRYPTED_AND_ENCRYPTED", + "ENCRYPTED_ONLY" + ], + "enumDeprecated": [ + false, + true, + true, + true, + false, + false + ], + "enumDescriptions": [ + "SSL mode not specified. Defaults to ENCRYPTED_ONLY.", + "SSL connections are optional. CA verification not enforced.", + "SSL connections are required. CA verification not enforced. Clients may use locally self-signed certificates (default psql client behavior).", + "SSL connections are required. CA verification enforced. Clients must have certificates signed by a Cluster CA, e.g. via GenerateClientCertificate.", + "SSL connections are optional. CA verification not enforced.", + "SSL connections are required. CA verification not enforced." + ], + "type": "string" + } + }, + "type": "object" + }, + "Status": { + "description": "The `Status` type defines a logical error model that is suitable for different programming environments, including REST APIs and RPC APIs. It is used by [gRPC](https://github.com/grpc). Each `Status` message contains three pieces of data: error code, error message, and error details. You can find out more about this error model and how to work with it in the [API Design Guide](https://cloud.google.com/apis/design/errors).", + "id": "Status", + "properties": { + "code": { + "description": "The status code, which should be an enum value of google.rpc.Code.", + "format": "int32", + "type": "integer" + }, + "details": { + "description": "A list of messages that carry the error details. There is a common set of message types for APIs to use.", + "items": { + "additionalProperties": { + "description": "Properties of the object. Contains field @type with type URL.", + "type": "any" + }, + "type": "object" + }, + "type": "array" + }, + "message": { + "description": "A developer-facing error message, which should be in English. Any user-facing error message should be localized and sent in the google.rpc.Status.details field, or localized by the client.", + "type": "string" + } + }, + "type": "object" + }, + "StorageDatabasecenterPartnerapiV1mainAvailabilityConfiguration": { + "description": "Configuration for availability of database instance", + "id": "StorageDatabasecenterPartnerapiV1mainAvailabilityConfiguration", + "properties": { + "availabilityType": { + "description": "Availability type. Potential values: * `ZONAL`: The instance serves data from only one zone. Outages in that zone affect data accessibility. * `REGIONAL`: The instance can serve data from more than one zone in a region (it is highly available).", + "enum": [ + "AVAILABILITY_TYPE_UNSPECIFIED", + "ZONAL", + "REGIONAL", + "MULTI_REGIONAL", + "AVAILABILITY_TYPE_OTHER" + ], + "enumDescriptions": [ + "", + "Zonal available instance.", + "Regional available instance.", + "Multi regional instance", + "For rest of the other category" + ], + "type": "string" + }, + "externalReplicaConfigured": { + "type": "boolean" + }, + "promotableReplicaConfigured": { + "type": "boolean" + } + }, + "type": "object" + }, + "StorageDatabasecenterPartnerapiV1mainBackupConfiguration": { + "description": "Configuration for automatic backups", + "id": "StorageDatabasecenterPartnerapiV1mainBackupConfiguration", + "properties": { + "automatedBackupEnabled": { + "description": "Whether customer visible automated backups are enabled on the instance.", + "type": "boolean" + }, + "backupRetentionSettings": { + "$ref": "StorageDatabasecenterPartnerapiV1mainRetentionSettings", + "description": "Backup retention settings." + } + }, + "type": "object" + }, + "StorageDatabasecenterPartnerapiV1mainBackupRun": { + "description": "A backup run.", + "id": "StorageDatabasecenterPartnerapiV1mainBackupRun", + "properties": { + "endTime": { + "description": "The time the backup operation completed. REQUIRED", + "format": "google-datetime", + "type": "string" + }, + "error": { + "$ref": "StorageDatabasecenterPartnerapiV1mainOperationError", + "description": "Information about why the backup operation failed. This is only present if the run has the FAILED status. OPTIONAL" + }, + "startTime": { + "description": "The time the backup operation started. REQUIRED", + "format": "google-datetime", + "type": "string" + }, + "status": { + "description": "The status of this run. REQUIRED", + "enum": [ + "STATUS_UNSPECIFIED", + "SUCCESSFUL", + "FAILED" + ], + "enumDescriptions": [ + "", + "The backup was successful.", + "The backup was unsuccessful." + ], + "type": "string" + } + }, + "type": "object" + }, + "StorageDatabasecenterPartnerapiV1mainDatabaseResourceFeed": { + "description": "DatabaseResourceFeed is the top level proto to be used to ingest different database resource level events into Condor platform.", + "id": "StorageDatabasecenterPartnerapiV1mainDatabaseResourceFeed", + "properties": { + "feedTimestamp": { + "description": "Required. Timestamp when feed is generated.", + "format": "google-datetime", + "type": "string" + }, + "feedType": { + "description": "Required. Type feed to be ingested into condor", + "enum": [ + "FEEDTYPE_UNSPECIFIED", + "RESOURCE_METADATA", + "OBSERVABILITY_DATA", + "COMPLIANCE_DATA" + ], + "enumDescriptions": [ + "", + "Database resource metadata feed from control plane", + "Database resource monitoring data", + "Database resource compliance feed" + ], + "type": "string" + }, + "resourceId": { + "$ref": "StorageDatabasecenterPartnerapiV1mainDatabaseResourceId", + "description": "Required. Primary key associated with the Resource" + }, + "resourceMetadata": { + "$ref": "StorageDatabasecenterPartnerapiV1mainDatabaseResourceMetadata", + "description": "More feed data would be added in subsequent CLs" + } + }, + "type": "object" + }, + "StorageDatabasecenterPartnerapiV1mainDatabaseResourceId": { + "description": "DatabaseResourceId will serve as primary key for any resource ingestion event.", + "id": "StorageDatabasecenterPartnerapiV1mainDatabaseResourceId", + "properties": { + "provider": { + "description": "Required. Cloud provider name. Ex: GCP/AWS/Azure/OnPrem/SelfManaged", + "enum": [ + "PROVIDER_UNSPECIFIED", + "GCP", + "AWS", + "AZURE", + "ONPREM", + "SELFMANAGED", + "PROVIDER_OTHER" + ], + "enumDescriptions": [ + "", + "Google cloud platform provider", + "Amazon web service", + "Azure web service", + "On-prem database provider", + "Self-managed database provider", + "For rest of the other category" + ], + "type": "string" + }, + "resourceType": { + "description": "Required. The type of resource this ID is identifying. Ex google.sqladmin.Instance, google.alloydb.cluster, google.sqladmin.Backup REQUIRED", + "type": "string" + }, + "uniqueId": { + "description": "Required. A service-local token that distinguishes this resource from other resources within the same service.", + "type": "string" + } + }, + "type": "object" + }, + "StorageDatabasecenterPartnerapiV1mainDatabaseResourceMetadata": { + "description": "Common model for database resource instance metadata.", + "id": "StorageDatabasecenterPartnerapiV1mainDatabaseResourceMetadata", + "properties": { + "availabilityConfiguration": { + "$ref": "StorageDatabasecenterPartnerapiV1mainAvailabilityConfiguration", + "description": "Availability configuration for this instance" + }, + "backupConfiguration": { + "$ref": "StorageDatabasecenterPartnerapiV1mainBackupConfiguration", + "description": "Backup configuration for this instance" + }, + "backupRun": { + "$ref": "StorageDatabasecenterPartnerapiV1mainBackupRun", + "description": "Latest backup run information for this instance" + }, + "creationTime": { + "description": "The creation time of the resource, i.e. the time when resource is created and recorded in partner service.", + "format": "google-datetime", + "type": "string" + }, + "currentState": { + "description": "Current state of the instance.", + "enum": [ + "STATE_UNSPECIFIED", + "HEALTHY", + "UNHEALTHY", + "STATE_OTHER" + ], + "enumDescriptions": [ + "", + "The instance is running.", + "Instance being created, updated, deleted or under maintenance", + "For rest of the other category" + ], + "type": "string" + }, + "expectedState": { + "description": "The actual instance state.", + "enum": [ + "STATE_UNSPECIFIED", + "HEALTHY", + "UNHEALTHY", + "STATE_OTHER" + ], + "enumDescriptions": [ + "", + "The instance is running.", + "Instance being created, updated, deleted or under maintenance", + "For rest of the other category" + ], + "type": "string" + }, + "id": { + "$ref": "StorageDatabasecenterPartnerapiV1mainDatabaseResourceId", + "description": "Required. Unique identifier for a Database resource" + }, + "instanceType": { + "description": "The type of the instance. Specified at creation time.", + "enum": [ + "INSTANCE_TYPE_UNSPECIFIED", + "PRIMARY", + "READ_REPLICA", + "OTHER" + ], + "enumDescriptions": [ + "", + "A regular primary database instance.", + "An instance acting as a read-replica.", + "For rest of the other categories." + ], + "type": "string" + }, + "location": { + "description": "The resource location. REQUIRED", + "type": "string" + }, + "primaryResourceId": { + "$ref": "StorageDatabasecenterPartnerapiV1mainDatabaseResourceId", + "description": "Unique identifier for this resource's immediate parent resource. This parent resource id would be used to build resource hierarchy in condor platform." + }, + "product": { + "$ref": "StorageDatabasecenterProtoCommonProduct", + "description": "The product this resource represents." + }, + "resourceContainer": { + "description": "Closest parent Cloud Resource Manager container of this resource. It must either be resource name of a Cloud Resource Manager project, for ex: \"projects/123\".", + "type": "string" + }, + "resourceName": { + "description": "Required. Different from unique_id, a resource name can be reused over time. That is after a resource named \"ABC\" is deleted, the name \"ABC\" can be used to to create a new resource within the same source.", + "type": "string" + }, + "updationTime": { + "description": "The time at which the resource was updated and recorded at partner service.", + "format": "google-datetime", + "type": "string" + }, + "userLabels": { + "additionalProperties": { + "type": "string" + }, + "description": "User-provided labels, represented as a dictionary where each label is a single key value pair.", + "type": "object" + } + }, + "type": "object" + }, + "StorageDatabasecenterPartnerapiV1mainOperationError": { + "description": "An error that occurred during a backup creation operation.", + "id": "StorageDatabasecenterPartnerapiV1mainOperationError", + "properties": { + "code": { + "description": "Identifies the specific error that occurred. REQUIRED", + "type": "string" + }, + "message": { + "description": "Additional information about the error encountered. REQUIRED", + "type": "string" + } + }, + "type": "object" + }, + "StorageDatabasecenterPartnerapiV1mainRetentionSettings": { + "id": "StorageDatabasecenterPartnerapiV1mainRetentionSettings", + "properties": { + "quantityBasedRetention": { + "format": "int32", + "type": "integer" + }, + "retentionUnit": { + "description": "The unit that 'retained_backups' represents.", + "enum": [ + "RETENTION_UNIT_UNSPECIFIED", + "COUNT", + "TIME", + "RETENTION_UNIT_OTHER" + ], + "enumDescriptions": [ + "Backup retention unit is unspecified, will be treated as COUNT.", + "Retention will be by count, eg. \"retain the most recent 7 backups\".", + "Retention will be by Time, eg. \"retain the last 7 days backups\".", + "For rest of the other category" + ], + "type": "string" + }, + "timeBasedRetention": { + "format": "google-duration", + "type": "string" + } + }, + "type": "object" + }, + "StorageDatabasecenterProtoCommonProduct": { + "description": "Product specification for Condor resources.", + "id": "StorageDatabasecenterProtoCommonProduct", + "properties": { + "engine": { + "description": "The specific engine that the underlying database is running.", + "enum": [ + "ENGINE_UNSPECIFIED", + "MYSQL", + "POSTGRES", + "SQL_SERVER", + "NATIVE", + "SPANGRES", + "ENGINE_OTHER" + ], + "enumDescriptions": [ + "UNSPECIFIED means engine type is not known or available.", + "MySQL binary running as engine in database instance.", + "Postgres binary running as engine in database instance.", + "SQLServer binary running as engine in database instance.", + "Native database binary running as engine in instance.", + "Cloud Spanner with Postgres dialect.", + "Other refers to rest of other database engine. This is to be when engine is known, but it is not present in this enum." + ], + "type": "string" + }, + "type": { + "description": "Type of specific database product. It could be CloudSQL, AlloyDB etc..", + "enum": [ + "PRODUCT_TYPE_UNSPECIFIED", + "CLOUD_SQL", + "ALLOYDB", + "SPANNER", + "ON_PREM", + "PRODUCT_TYPE_OTHER" + ], + "enumDescriptions": [ + "UNSPECIFIED means product type is not known or available.", + "Cloud SQL product area in GCP", + "AlloyDB product area in GCP", + "Spanner product area in GCP", + "On premises database product.", + "Other refers to rest of other product type. This is to be when product type is known, but it is not present in this enum." + ], + "type": "string" + }, + "version": { + "description": "Version of the underlying database engine. Example values: For MySQL, it could be \"8.0\", \"5.7\" etc.. For Postgres, it could be \"14\", \"15\" etc..", + "type": "string" + } + }, + "type": "object" + }, + "StringRestrictions": { + "description": "Restrictions on STRING type values", + "id": "StringRestrictions", + "properties": { + "allowedValues": { + "description": "The list of allowed values, if bounded. This field will be empty if there is a unbounded number of allowed values.", + "items": { + "type": "string" + }, + "type": "array" + } + }, + "type": "object" + }, + "SupportedDatabaseFlag": { + "description": "SupportedDatabaseFlag gives general information about a database flag, like type and allowed values. This is a static value that is defined on the server side, and it cannot be modified by callers. To set the Database flags on a particular Instance, a caller should modify the Instance.database_flags field.", + "id": "SupportedDatabaseFlag", + "properties": { + "acceptsMultipleValues": { + "description": "Whether the database flag accepts multiple values. If true, a comma-separated list of stringified values may be specified.", + "type": "boolean" + }, + "flagName": { + "description": "The name of the database flag, e.g. \"max_allowed_packets\". The is a possibly key for the Instance.database_flags map field.", + "type": "string" + }, + "integerRestrictions": { + "$ref": "IntegerRestrictions", + "description": "Restriction on INTEGER type value." + }, + "name": { + "description": "The name of the flag resource, following Google Cloud conventions, e.g.: * projects/{project}/locations/{location}/flags/{flag} This field currently has no semantic meaning.", + "type": "string" + }, + "requiresDbRestart": { + "description": "Whether setting or updating this flag on an Instance requires a database restart. If a flag that requires database restart is set, the backend will automatically restart the database (making sure to satisfy any availability SLO's).", + "type": "boolean" + }, + "stringRestrictions": { + "$ref": "StringRestrictions", + "description": "Restriction on STRING type value." + }, + "supportedDbVersions": { + "description": "Major database engine versions for which this flag is supported.", + "items": { + "enum": [ + "DATABASE_VERSION_UNSPECIFIED", + "POSTGRES_13", + "POSTGRES_14", + "POSTGRES_15" + ], + "enumDeprecated": [ + false, + true, + false, + false + ], + "enumDescriptions": [ + "This is an unknown database version.", + "DEPRECATED - The database version is Postgres 13.", + "The database version is Postgres 14.", + "The database version is Postgres 15." + ], + "type": "string" + }, + "type": "array" + }, + "valueType": { + "enum": [ + "VALUE_TYPE_UNSPECIFIED", + "STRING", + "INTEGER", + "FLOAT", + "NONE" + ], + "enumDescriptions": [ + "This is an unknown flag type.", + "String type flag.", + "Integer type flag.", + "Float type flag.", + "Denotes that the flag does not accept any values." + ], + "type": "string" + } + }, + "type": "object" + }, + "TimeBasedRetention": { + "description": "A time based retention policy specifies that all backups within a certain time period should be retained.", + "id": "TimeBasedRetention", + "properties": { + "retentionPeriod": { + "description": "The retention period.", + "format": "google-duration", + "type": "string" + } + }, + "type": "object" + }, + "UpdatePolicy": { + "description": "Policy to be used while updating the instance.", + "id": "UpdatePolicy", + "properties": { + "mode": { + "description": "Mode for updating the instance.", + "enum": [ + "MODE_UNSPECIFIED", + "DEFAULT", + "FORCE_APPLY" + ], + "enumDescriptions": [ + "Mode is unknown.", + "Least disruptive way to apply the update.", + "Performs a forced update when applicable. This will be fast but may incur a downtime." + ], + "type": "string" + } + }, + "type": "object" + }, + "User": { + "description": "Message describing User object.", + "id": "User", + "properties": { + "databaseRoles": { + "description": "Optional. List of database roles this user has. The database role strings are subject to the PostgreSQL naming conventions.", + "items": { + "type": "string" + }, + "type": "array" + }, + "name": { + "description": "Output only. Name of the resource in the form of projects/{project}/locations/{location}/cluster/{cluster}/users/{user}.", + "readOnly": true, + "type": "string" + }, + "password": { + "description": "Input only. Password for the user.", + "type": "string" + }, + "userType": { + "description": "Optional. Type of this user.", + "enum": [ + "USER_TYPE_UNSPECIFIED", + "ALLOYDB_BUILT_IN", + "ALLOYDB_IAM_USER" + ], + "enumDescriptions": [ + "Unspecified user type.", + "The default user type that authenticates via password-based authentication.", + "Database user that can authenticate via IAM-Based authentication." + ], + "type": "string" + } + }, + "type": "object" + }, + "UserPassword": { + "description": "The username/password for a database user. Used for specifying initial users at cluster creation time.", + "id": "UserPassword", + "properties": { + "password": { + "description": "The initial password for the user.", + "type": "string" + }, + "user": { + "description": "The database username.", + "type": "string" + } + }, + "type": "object" + }, + "WeeklySchedule": { + "description": "A weekly schedule starts a backup at prescribed start times within a day, for the specified days of the week. The weekly schedule message is flexible and can be used to create many types of schedules. For example, to have a daily backup that starts at 22:00, configure the `start_times` field to have one element \"22:00\" and the `days_of_week` field to have all seven days of the week.", + "id": "WeeklySchedule", + "properties": { + "daysOfWeek": { + "description": "The days of the week to perform a backup. If this field is left empty, the default of every day of the week is used.", + "items": { + "enum": [ + "DAY_OF_WEEK_UNSPECIFIED", + "MONDAY", + "TUESDAY", + "WEDNESDAY", + "THURSDAY", + "FRIDAY", + "SATURDAY", + "SUNDAY" + ], + "enumDescriptions": [ + "The day of the week is unspecified.", + "Monday", + "Tuesday", + "Wednesday", + "Thursday", + "Friday", + "Saturday", + "Sunday" + ], + "type": "string" + }, + "type": "array" + }, + "startTimes": { + "description": "The times during the day to start a backup. The start times are assumed to be in UTC and to be an exact hour (e.g., 04:00:00). If no start times are provided, a single fixed start time is chosen arbitrarily.", + "items": { + "$ref": "GoogleTypeTimeOfDay" + }, + "type": "array" + } + }, + "type": "object" + } + }, + "servicePath": "", + "title": "AlloyDB API", + "version": "v1beta", + "version_module": true +} \ No newline at end of file diff --git a/alloydb/v1beta/alloydb-gen.go b/alloydb/v1beta/alloydb-gen.go new file mode 100644 index 00000000000..37ca42be4b8 --- /dev/null +++ b/alloydb/v1beta/alloydb-gen.go @@ -0,0 +1,9766 @@ +// Copyright 2023 Google LLC. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +// Code generated file. DO NOT EDIT. + +// Package alloydb provides access to the AlloyDB API. +// +// For product documentation, see: https://cloud.google.com/alloydb/ +// +// # Library status +// +// These client libraries are officially supported by Google. However, this +// library is considered complete and is in maintenance mode. This means +// that we will address critical bugs and security issues but will not add +// any new features. +// +// When possible, we recommend using our newer +// [Cloud Client Libraries for Go](https://pkg.go.dev/cloud.google.com/go) +// that are still actively being worked and iterated on. +// +// # Creating a client +// +// Usage example: +// +// import "google.golang.org/api/alloydb/v1beta" +// ... +// ctx := context.Background() +// alloydbService, err := alloydb.NewService(ctx) +// +// In this example, Google Application Default Credentials are used for +// authentication. For information on how to create and obtain Application +// Default Credentials, see https://developers.google.com/identity/protocols/application-default-credentials. +// +// # Other authentication options +// +// To use an API key for authentication (note: some APIs do not support API +// keys), use [google.golang.org/api/option.WithAPIKey]: +// +// alloydbService, err := alloydb.NewService(ctx, option.WithAPIKey("AIza...")) +// +// To use an OAuth token (e.g., a user token obtained via a three-legged OAuth +// flow, use [google.golang.org/api/option.WithTokenSource]: +// +// config := &oauth2.Config{...} +// // ... +// token, err := config.Exchange(ctx, ...) +// alloydbService, err := alloydb.NewService(ctx, option.WithTokenSource(config.TokenSource(ctx, token))) +// +// See [google.golang.org/api/option.ClientOption] for details on options. +package alloydb // import "google.golang.org/api/alloydb/v1beta" + +import ( + "bytes" + "context" + "encoding/json" + "errors" + "fmt" + "io" + "net/http" + "net/url" + "strconv" + "strings" + + googleapi "google.golang.org/api/googleapi" + internal "google.golang.org/api/internal" + gensupport "google.golang.org/api/internal/gensupport" + option "google.golang.org/api/option" + internaloption "google.golang.org/api/option/internaloption" + htransport "google.golang.org/api/transport/http" +) + +// Always reference these packages, just in case the auto-generated code +// below doesn't. +var _ = bytes.NewBuffer +var _ = strconv.Itoa +var _ = fmt.Sprintf +var _ = json.NewDecoder +var _ = io.Copy +var _ = url.Parse +var _ = gensupport.MarshalJSON +var _ = googleapi.Version +var _ = errors.New +var _ = strings.Replace +var _ = context.Canceled +var _ = internaloption.WithDefaultEndpoint +var _ = internal.Version + +const apiId = "alloydb:v1beta" +const apiName = "alloydb" +const apiVersion = "v1beta" +const basePath = "https://alloydb.googleapis.com/" +const mtlsBasePath = "https://alloydb.mtls.googleapis.com/" + +// OAuth2 scopes used by this API. +const ( + // See, edit, configure, and delete your Google Cloud data and see the + // email address for your Google Account. + CloudPlatformScope = "https://www.googleapis.com/auth/cloud-platform" +) + +// NewService creates a new Service. +func NewService(ctx context.Context, opts ...option.ClientOption) (*Service, error) { + scopesOption := internaloption.WithDefaultScopes( + "https://www.googleapis.com/auth/cloud-platform", + ) + // NOTE: prepend, so we don't override user-specified scopes. + opts = append([]option.ClientOption{scopesOption}, opts...) + opts = append(opts, internaloption.WithDefaultEndpoint(basePath)) + opts = append(opts, internaloption.WithDefaultMTLSEndpoint(mtlsBasePath)) + client, endpoint, err := htransport.NewClient(ctx, opts...) + if err != nil { + return nil, err + } + s, err := New(client) + if err != nil { + return nil, err + } + if endpoint != "" { + s.BasePath = endpoint + } + return s, nil +} + +// New creates a new Service. It uses the provided http.Client for requests. +// +// Deprecated: please use NewService instead. +// To provide a custom HTTP client, use option.WithHTTPClient. +// If you are using google.golang.org/api/googleapis/transport.APIKey, use option.WithAPIKey with NewService instead. +func New(client *http.Client) (*Service, error) { + if client == nil { + return nil, errors.New("client is nil") + } + s := &Service{client: client, BasePath: basePath} + s.Projects = NewProjectsService(s) + return s, nil +} + +type Service struct { + client *http.Client + BasePath string // API endpoint base URL + UserAgent string // optional additional User-Agent fragment + + Projects *ProjectsService +} + +func (s *Service) userAgent() string { + if s.UserAgent == "" { + return googleapi.UserAgent + } + return googleapi.UserAgent + " " + s.UserAgent +} + +func NewProjectsService(s *Service) *ProjectsService { + rs := &ProjectsService{s: s} + rs.Locations = NewProjectsLocationsService(s) + return rs +} + +type ProjectsService struct { + s *Service + + Locations *ProjectsLocationsService +} + +func NewProjectsLocationsService(s *Service) *ProjectsLocationsService { + rs := &ProjectsLocationsService{s: s} + rs.Backups = NewProjectsLocationsBackupsService(s) + rs.Clusters = NewProjectsLocationsClustersService(s) + rs.Operations = NewProjectsLocationsOperationsService(s) + rs.SupportedDatabaseFlags = NewProjectsLocationsSupportedDatabaseFlagsService(s) + return rs +} + +type ProjectsLocationsService struct { + s *Service + + Backups *ProjectsLocationsBackupsService + + Clusters *ProjectsLocationsClustersService + + Operations *ProjectsLocationsOperationsService + + SupportedDatabaseFlags *ProjectsLocationsSupportedDatabaseFlagsService +} + +func NewProjectsLocationsBackupsService(s *Service) *ProjectsLocationsBackupsService { + rs := &ProjectsLocationsBackupsService{s: s} + return rs +} + +type ProjectsLocationsBackupsService struct { + s *Service +} + +func NewProjectsLocationsClustersService(s *Service) *ProjectsLocationsClustersService { + rs := &ProjectsLocationsClustersService{s: s} + rs.Instances = NewProjectsLocationsClustersInstancesService(s) + rs.Users = NewProjectsLocationsClustersUsersService(s) + return rs +} + +type ProjectsLocationsClustersService struct { + s *Service + + Instances *ProjectsLocationsClustersInstancesService + + Users *ProjectsLocationsClustersUsersService +} + +func NewProjectsLocationsClustersInstancesService(s *Service) *ProjectsLocationsClustersInstancesService { + rs := &ProjectsLocationsClustersInstancesService{s: s} + return rs +} + +type ProjectsLocationsClustersInstancesService struct { + s *Service +} + +func NewProjectsLocationsClustersUsersService(s *Service) *ProjectsLocationsClustersUsersService { + rs := &ProjectsLocationsClustersUsersService{s: s} + return rs +} + +type ProjectsLocationsClustersUsersService struct { + s *Service +} + +func NewProjectsLocationsOperationsService(s *Service) *ProjectsLocationsOperationsService { + rs := &ProjectsLocationsOperationsService{s: s} + return rs +} + +type ProjectsLocationsOperationsService struct { + s *Service +} + +func NewProjectsLocationsSupportedDatabaseFlagsService(s *Service) *ProjectsLocationsSupportedDatabaseFlagsService { + rs := &ProjectsLocationsSupportedDatabaseFlagsService{s: s} + return rs +} + +type ProjectsLocationsSupportedDatabaseFlagsService struct { + s *Service +} + +// AutomatedBackupPolicy: Message describing the user-specified +// automated backup policy. All fields in the automated backup policy +// are optional. Defaults for each field are provided if they are not +// set. +type AutomatedBackupPolicy struct { + // BackupWindow: The length of the time window during which a backup can + // be taken. If a backup does not succeed within this time window, it + // will be canceled and considered failed. The backup window must be at + // least 5 minutes long. There is no upper bound on the window. If not + // set, it defaults to 1 hour. + BackupWindow string `json:"backupWindow,omitempty"` + + // Enabled: Whether automated automated backups are enabled. If not set, + // defaults to true. + Enabled bool `json:"enabled,omitempty"` + + // EncryptionConfig: Optional. The encryption config can be specified to + // encrypt the backups with a customer-managed encryption key (CMEK). + // When this field is not specified, the backup will then use default + // encryption scheme to protect the user data. + EncryptionConfig *EncryptionConfig `json:"encryptionConfig,omitempty"` + + // Labels: Labels to apply to backups created using this configuration. + Labels map[string]string `json:"labels,omitempty"` + + // Location: The location where the backup will be stored. Currently, + // the only supported option is to store the backup in the same region + // as the cluster. If empty, defaults to the region of the cluster. + Location string `json:"location,omitempty"` + + // QuantityBasedRetention: Quantity-based Backup retention policy to + // retain recent backups. + QuantityBasedRetention *QuantityBasedRetention `json:"quantityBasedRetention,omitempty"` + + // TimeBasedRetention: Time-based Backup retention policy. + TimeBasedRetention *TimeBasedRetention `json:"timeBasedRetention,omitempty"` + + // WeeklySchedule: Weekly schedule for the Backup. + WeeklySchedule *WeeklySchedule `json:"weeklySchedule,omitempty"` + + // ForceSendFields is a list of field names (e.g. "BackupWindow") 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. "BackupWindow") 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 *AutomatedBackupPolicy) MarshalJSON() ([]byte, error) { + type NoMethod AutomatedBackupPolicy + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// Backup: Message describing Backup object +type Backup struct { + // Annotations: Annotations to allow client tools to store small amount + // of arbitrary data. This is distinct from labels. + // https://google.aip.dev/128 + Annotations map[string]string `json:"annotations,omitempty"` + + // ClusterName: Required. The full resource name of the backup source + // cluster (e.g., + // projects/{project}/locations/{region}/clusters/{cluster_id}). + ClusterName string `json:"clusterName,omitempty"` + + // ClusterUid: Output only. The system-generated UID of the cluster + // which was used to create this resource. + ClusterUid string `json:"clusterUid,omitempty"` + + // CreateTime: Output only. Create time stamp + CreateTime string `json:"createTime,omitempty"` + + // DatabaseVersion: Output only. The database engine major version of + // the cluster this backup was created from. Any restored cluster + // created from this backup will have the same database version. + // + // Possible values: + // "DATABASE_VERSION_UNSPECIFIED" - This is an unknown database + // version. + // "POSTGRES_13" - DEPRECATED - The database version is Postgres 13. + // "POSTGRES_14" - The database version is Postgres 14. + // "POSTGRES_15" - The database version is Postgres 15. + DatabaseVersion string `json:"databaseVersion,omitempty"` + + // DeleteTime: Output only. Delete time stamp + DeleteTime string `json:"deleteTime,omitempty"` + + // Description: User-provided description of the backup. + Description string `json:"description,omitempty"` + + // DisplayName: User-settable and human-readable display name for the + // Backup. + DisplayName string `json:"displayName,omitempty"` + + // EncryptionConfig: Optional. The encryption config can be specified to + // encrypt the backup with a customer-managed encryption key (CMEK). + // When this field is not specified, the backup will then use default + // encryption scheme to protect the user data. + EncryptionConfig *EncryptionConfig `json:"encryptionConfig,omitempty"` + + // EncryptionInfo: Output only. The encryption information for the + // backup. + EncryptionInfo *EncryptionInfo `json:"encryptionInfo,omitempty"` + + // Etag: For Resource freshness validation (https://google.aip.dev/154) + Etag string `json:"etag,omitempty"` + + // ExpiryQuantity: Output only. The QuantityBasedExpiry of the backup, + // specified by the backup's retention policy. Once the expiry quantity + // is over retention, the backup is eligible to be garbage collected. + ExpiryQuantity *QuantityBasedExpiry `json:"expiryQuantity,omitempty"` + + // ExpiryTime: Output only. The time at which after the backup is + // eligible to be garbage collected. It is the duration specified by the + // backup's retention policy, added to the backup's create_time. + ExpiryTime string `json:"expiryTime,omitempty"` + + // Labels: Labels as key value pairs + Labels map[string]string `json:"labels,omitempty"` + + // Name: Output only. The name of the backup resource with the format: * + // projects/{project}/locations/{region}/backups/{backup_id} where the + // cluster and backup ID segments should satisfy the regex expression + // `[a-z]([a-z0-9-]{0,61}[a-z0-9])?`, e.g. 1-63 characters of lowercase + // letters, numbers, and dashes, starting with a letter, and ending with + // a letter or number. For more details see https://google.aip.dev/122. + // The prefix of the backup resource name is the name of the parent + // resource: * projects/{project}/locations/{region} + Name string `json:"name,omitempty"` + + // Reconciling: Output only. Reconciling + // (https://google.aip.dev/128#reconciliation), if true, indicates that + // the service is actively updating the resource. This can happen due to + // user-triggered updates or system actions like failover or + // maintenance. + Reconciling bool `json:"reconciling,omitempty"` + + // SizeBytes: Output only. The size of the backup in bytes. + SizeBytes int64 `json:"sizeBytes,omitempty,string"` + + // State: Output only. The current state of the backup. + // + // Possible values: + // "STATE_UNSPECIFIED" - The state of the backup is unknown. + // "READY" - The backup is ready. + // "CREATING" - The backup is creating. + // "FAILED" - The backup failed. + // "DELETING" - The backup is being deleted. + State string `json:"state,omitempty"` + + // Type: The backup type, which suggests the trigger for the backup. + // + // Possible values: + // "TYPE_UNSPECIFIED" - Backup Type is unknown. + // "ON_DEMAND" - ON_DEMAND backups that were triggered by the customer + // (e.g., not AUTOMATED). + // "AUTOMATED" - AUTOMATED backups triggered by the automated backups + // scheduler pursuant to an automated backup policy. + // "CONTINUOUS" - CONTINUOUS backups triggered by the automated + // backups scheduler due to a continuous backup policy. + Type string `json:"type,omitempty"` + + // Uid: Output only. The system-generated UID of the resource. The UID + // is assigned when the resource is created, and it is retained until it + // is deleted. + Uid string `json:"uid,omitempty"` + + // UpdateTime: Output only. Update time stamp + UpdateTime string `json:"updateTime,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the + // server. + googleapi.ServerResponse `json:"-"` + + // ForceSendFields is a list of field names (e.g. "Annotations") 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. "Annotations") 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 *Backup) MarshalJSON() ([]byte, error) { + type NoMethod Backup + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// BackupSource: Message describing a BackupSource. +type BackupSource struct { + // BackupName: Required. The name of the backup resource with the + // format: * projects/{project}/locations/{region}/backups/{backup_id} + BackupName string `json:"backupName,omitempty"` + + // BackupUid: Output only. The system-generated UID of the backup which + // was used to create this resource. The UID is generated when the + // backup is created, and it is retained until the backup is deleted. + BackupUid string `json:"backupUid,omitempty"` + + // ForceSendFields is a list of field names (e.g. "BackupName") 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. "BackupName") 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 *BackupSource) MarshalJSON() ([]byte, error) { + type NoMethod BackupSource + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// ClientConnectionConfig: Client connection configuration +type ClientConnectionConfig struct { + // RequireConnectors: Optional. Configuration to enforce connectors only + // (ex: AuthProxy) connections to the database. + RequireConnectors bool `json:"requireConnectors,omitempty"` + + // SslConfig: Optional. SSL config option for this instance. + SslConfig *SslConfig `json:"sslConfig,omitempty"` + + // ForceSendFields is a list of field names (e.g. "RequireConnectors") + // 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. "RequireConnectors") 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 *ClientConnectionConfig) MarshalJSON() ([]byte, error) { + type NoMethod ClientConnectionConfig + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// CloudControl2SharedOperationsReconciliationOperationMetadata: +// Operation metadata returned by the CLH during resource state +// reconciliation. +type CloudControl2SharedOperationsReconciliationOperationMetadata struct { + // DeleteResource: DEPRECATED. Use exclusive_action instead. + DeleteResource bool `json:"deleteResource,omitempty"` + + // ExclusiveAction: Excluisive action returned by the CLH. + // + // Possible values: + // "UNKNOWN_REPAIR_ACTION" - Unknown repair action. + // "DELETE" - The resource has to be deleted. When using this bit, the + // CLH should fail the operation. DEPRECATED. Instead use + // DELETE_RESOURCE OperationSignal in SideChannel. + // "RETRY" - This resource could not be repaired but the repair should + // be tried again at a later time. This can happen if there is a + // dependency that needs to be resolved first- e.g. if a parent resource + // must be repaired before a child resource. + ExclusiveAction string `json:"exclusiveAction,omitempty"` + + // ForceSendFields is a list of field names (e.g. "DeleteResource") 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. "DeleteResource") 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 *CloudControl2SharedOperationsReconciliationOperationMetadata) MarshalJSON() ([]byte, error) { + type NoMethod CloudControl2SharedOperationsReconciliationOperationMetadata + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// Cluster: A cluster is a collection of regional AlloyDB resources. It +// can include a primary instance and one or more read pool instances. +// All cluster resources share a storage layer, which scales as needed. +type Cluster struct { + // Annotations: Annotations to allow client tools to store small amount + // of arbitrary data. This is distinct from labels. + // https://google.aip.dev/128 + Annotations map[string]string `json:"annotations,omitempty"` + + // AutomatedBackupPolicy: The automated backup policy for this cluster. + // If no policy is provided then the default policy will be used. If + // backups are supported for the cluster, the default policy takes one + // backup a day, has a backup window of 1 hour, and retains backups for + // 14 days. For more information on the defaults, consult the + // documentation for the message type. + AutomatedBackupPolicy *AutomatedBackupPolicy `json:"automatedBackupPolicy,omitempty"` + + // BackupSource: Output only. Cluster created from backup. + BackupSource *BackupSource `json:"backupSource,omitempty"` + + // ClusterType: Output only. The type of the cluster. This is an + // output-only field and it's populated at the Cluster creation time or + // the Cluster promotion time. The cluster type is determined by which + // RPC was used to create the cluster (i.e. `CreateCluster` vs. + // `CreateSecondaryCluster` + // + // Possible values: + // "CLUSTER_TYPE_UNSPECIFIED" - The type of the cluster is unknown. + // "PRIMARY" - Primary cluster that support read and write operations. + // "SECONDARY" - Secondary cluster that is replicating from another + // region. This only supports read. + ClusterType string `json:"clusterType,omitempty"` + + // ContinuousBackupConfig: Optional. Continuous backup configuration for + // this cluster. + ContinuousBackupConfig *ContinuousBackupConfig `json:"continuousBackupConfig,omitempty"` + + // ContinuousBackupInfo: Output only. Continuous backup properties for + // this cluster. + ContinuousBackupInfo *ContinuousBackupInfo `json:"continuousBackupInfo,omitempty"` + + // CreateTime: Output only. Create time stamp + CreateTime string `json:"createTime,omitempty"` + + // DatabaseVersion: Optional. The database engine major version. This is + // an optional field and it is populated at the Cluster creation time. + // If a database version is not supplied at cluster creation time, then + // a default database version will be used. + // + // Possible values: + // "DATABASE_VERSION_UNSPECIFIED" - This is an unknown database + // version. + // "POSTGRES_13" - DEPRECATED - The database version is Postgres 13. + // "POSTGRES_14" - The database version is Postgres 14. + // "POSTGRES_15" - The database version is Postgres 15. + DatabaseVersion string `json:"databaseVersion,omitempty"` + + // DeleteTime: Output only. Delete time stamp + DeleteTime string `json:"deleteTime,omitempty"` + + // DisplayName: User-settable and human-readable display name for the + // Cluster. + DisplayName string `json:"displayName,omitempty"` + + // EncryptionConfig: Optional. The encryption config can be specified to + // encrypt the data disks and other persistent data resources of a + // cluster with a customer-managed encryption key (CMEK). When this + // field is not specified, the cluster will then use default encryption + // scheme to protect the user data. + EncryptionConfig *EncryptionConfig `json:"encryptionConfig,omitempty"` + + // EncryptionInfo: Output only. The encryption information for the + // cluster. + EncryptionInfo *EncryptionInfo `json:"encryptionInfo,omitempty"` + + // Etag: For Resource freshness validation (https://google.aip.dev/154) + Etag string `json:"etag,omitempty"` + + // InitialUser: Input only. Initial user to setup during cluster + // creation. Required. If used in `RestoreCluster` this is ignored. + InitialUser *UserPassword `json:"initialUser,omitempty"` + + // Labels: Labels as key value pairs + Labels map[string]string `json:"labels,omitempty"` + + // MigrationSource: Output only. Cluster created via DMS migration. + MigrationSource *MigrationSource `json:"migrationSource,omitempty"` + + // Name: Output only. The name of the cluster resource with the format: + // * projects/{project}/locations/{region}/clusters/{cluster_id} where + // the cluster ID segment should satisfy the regex expression + // `[a-z0-9-]+`. For more details see https://google.aip.dev/122. The + // prefix of the cluster resource name is the name of the parent + // resource: * projects/{project}/locations/{region} + Name string `json:"name,omitempty"` + + // Network: Required. The resource link for the VPC network in which + // cluster resources are created and from which they are accessible via + // Private IP. The network must belong to the same project as the + // cluster. It is specified in the form: + // "projects/{project}/global/networks/{network_id}". This is required + // to create a cluster. It can be updated, but it cannot be removed. + // Deprecated, use network_config.network instead. + Network string `json:"network,omitempty"` + + NetworkConfig *NetworkConfig `json:"networkConfig,omitempty"` + + // PrimaryConfig: Output only. Cross Region replication config specific + // to PRIMARY cluster. + PrimaryConfig *PrimaryConfig `json:"primaryConfig,omitempty"` + + // Reconciling: Output only. Reconciling + // (https://google.aip.dev/128#reconciliation). Set to true if the + // current state of Cluster does not match the user's intended state, + // and the service is actively updating the resource to reconcile them. + // This can happen due to user-triggered updates or system actions like + // failover or maintenance. + Reconciling bool `json:"reconciling,omitempty"` + + // SecondaryConfig: Cross Region replication config specific to + // SECONDARY cluster. + SecondaryConfig *SecondaryConfig `json:"secondaryConfig,omitempty"` + + // SslConfig: SSL configuration for this AlloyDB cluster. + SslConfig *SslConfig `json:"sslConfig,omitempty"` + + // State: Output only. The current serving state of the cluster. + // + // Possible values: + // "STATE_UNSPECIFIED" - The state of the cluster is unknown. + // "READY" - The cluster is active and running. + // "STOPPED" - The cluster is stopped. All instances in the cluster + // are stopped. Customers can start a stopped cluster at any point and + // all their instances will come back to life with same names and IP + // resources. In this state, customer pays for storage. Associated + // backups could also be present in a stopped cluster. + // "EMPTY" - The cluster is empty and has no associated resources. All + // instances, associated storage and backups have been deleted. + // "CREATING" - The cluster is being created. + // "DELETING" - The cluster is being deleted. + // "FAILED" - The creation of the cluster failed. + // "BOOTSTRAPPING" - The cluster is bootstrapping with data from some + // other source. Direct mutations to the cluster (e.g. adding read pool) + // are not allowed. + // "MAINTENANCE" - The cluster is under maintenance. AlloyDB regularly + // performs maintenance and upgrades on customer clusters. Updates on + // the cluster are not allowed while the cluster is in this state. + // "PROMOTING" - The cluster is being promoted. + State string `json:"state,omitempty"` + + // Uid: Output only. The system-generated UID of the resource. The UID + // is assigned when the resource is created, and it is retained until it + // is deleted. + Uid string `json:"uid,omitempty"` + + // UpdateTime: Output only. Update time stamp + UpdateTime string `json:"updateTime,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the + // server. + googleapi.ServerResponse `json:"-"` + + // ForceSendFields is a list of field names (e.g. "Annotations") 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. "Annotations") 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 *Cluster) MarshalJSON() ([]byte, error) { + type NoMethod Cluster + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// ConnectionInfo: ConnectionInfo singleton resource. +// https://google.aip.dev/156 +type ConnectionInfo struct { + // InstanceUid: Output only. The unique ID of the Instance. + InstanceUid string `json:"instanceUid,omitempty"` + + // IpAddress: Output only. The private network IP address for the + // Instance. This is the default IP for the instance and is always + // created (even if enable_public_ip is set). This is the connection + // endpoint for an end-user application. + IpAddress string `json:"ipAddress,omitempty"` + + // Name: The name of the ConnectionInfo singleton resource, e.g.: + // projects/{project}/locations/{location}/clusters/*/instances/*/connect + // ionInfo This field currently has no semantic meaning. + Name string `json:"name,omitempty"` + + // PemCertificateChain: Output only. The pem-encoded chain that may be + // used to verify the X.509 certificate. Expected to be in + // issuer-to-root order according to RFC 5246. + PemCertificateChain []string `json:"pemCertificateChain,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the + // server. + googleapi.ServerResponse `json:"-"` + + // ForceSendFields is a list of field names (e.g. "InstanceUid") 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. "InstanceUid") 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 *ConnectionInfo) MarshalJSON() ([]byte, error) { + type NoMethod ConnectionInfo + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// ContinuousBackupConfig: ContinuousBackupConfig describes the +// continuous backups recovery configurations of a cluster. +type ContinuousBackupConfig struct { + // Enabled: Whether ContinuousBackup is enabled. + Enabled bool `json:"enabled,omitempty"` + + // EncryptionConfig: The encryption config can be specified to encrypt + // the backups with a customer-managed encryption key (CMEK). When this + // field is not specified, the backup will then use default encryption + // scheme to protect the user data. + EncryptionConfig *EncryptionConfig `json:"encryptionConfig,omitempty"` + + // RecoveryWindowDays: The number of days that are eligible to restore + // from using PITR. To support the entire recovery window, backups and + // logs are retained for one day more than the recovery window. If not + // set, defaults to 14 days. + RecoveryWindowDays int64 `json:"recoveryWindowDays,omitempty"` + + // 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. "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:"-"` +} + +func (s *ContinuousBackupConfig) MarshalJSON() ([]byte, error) { + type NoMethod ContinuousBackupConfig + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// ContinuousBackupInfo: ContinuousBackupInfo describes the continuous +// backup properties of a cluster. +type ContinuousBackupInfo struct { + // EarliestRestorableTime: Output only. The earliest restorable time + // that can be restored to. Output only field. + EarliestRestorableTime string `json:"earliestRestorableTime,omitempty"` + + // EnabledTime: Output only. When ContinuousBackup was most recently + // enabled. Set to null if ContinuousBackup is not enabled. + EnabledTime string `json:"enabledTime,omitempty"` + + // EncryptionInfo: Output only. The encryption information for the WALs + // and backups required for ContinuousBackup. + EncryptionInfo *EncryptionInfo `json:"encryptionInfo,omitempty"` + + // Schedule: Output only. Days of the week on which a continuous backup + // is taken. Output only field. Ignored if passed into the request. + // + // Possible values: + // "DAY_OF_WEEK_UNSPECIFIED" - The day of the week is unspecified. + // "MONDAY" - Monday + // "TUESDAY" - Tuesday + // "WEDNESDAY" - Wednesday + // "THURSDAY" - Thursday + // "FRIDAY" - Friday + // "SATURDAY" - Saturday + // "SUNDAY" - Sunday + Schedule []string `json:"schedule,omitempty"` + + // ForceSendFields is a list of field names (e.g. + // "EarliestRestorableTime") 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. "EarliestRestorableTime") + // 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 *ContinuousBackupInfo) MarshalJSON() ([]byte, error) { + type NoMethod ContinuousBackupInfo + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// ContinuousBackupSource: Message describing a ContinuousBackupSource. +type ContinuousBackupSource struct { + // Cluster: Required. The source cluster from which to restore. This + // cluster must have continuous backup enabled for this operation to + // succeed. For the required format, see the comment on the Cluster.name + // field. + Cluster string `json:"cluster,omitempty"` + + // PointInTime: Required. The point in time to restore to. + PointInTime string `json:"pointInTime,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Cluster") 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. "Cluster") 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 *ContinuousBackupSource) MarshalJSON() ([]byte, error) { + type NoMethod ContinuousBackupSource + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// Empty: A generic empty message that you can re-use to avoid defining +// duplicated empty messages in your APIs. A typical example is to use +// it as the request or the response type of an API method. For +// instance: service Foo { rpc Bar(google.protobuf.Empty) returns +// (google.protobuf.Empty); } +type Empty struct { + // ServerResponse contains the HTTP response code and headers from the + // server. + googleapi.ServerResponse `json:"-"` +} + +// EncryptionConfig: EncryptionConfig describes the encryption config of +// a cluster or a backup that is encrypted with a CMEK (customer-managed +// encryption key). +type EncryptionConfig struct { + // KmsKeyName: The fully-qualified resource name of the KMS key. Each + // Cloud KMS key is regionalized and has the following format: + // projects/[PROJECT]/locations/[REGION]/keyRings/[RING]/cryptoKeys/[KEY_ + // NAME] + KmsKeyName string `json:"kmsKeyName,omitempty"` + + // ForceSendFields is a list of field names (e.g. "KmsKeyName") 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. "KmsKeyName") 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 *EncryptionConfig) MarshalJSON() ([]byte, error) { + type NoMethod EncryptionConfig + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// EncryptionInfo: EncryptionInfo describes the encryption information +// of a cluster or a backup. +type EncryptionInfo struct { + // EncryptionType: Output only. Type of encryption. + // + // Possible values: + // "TYPE_UNSPECIFIED" - Encryption type not specified. Defaults to + // GOOGLE_DEFAULT_ENCRYPTION. + // "GOOGLE_DEFAULT_ENCRYPTION" - The data is encrypted at rest with a + // key that is fully managed by Google. No key version will be + // populated. This is the default state. + // "CUSTOMER_MANAGED_ENCRYPTION" - The data is encrypted at rest with + // a key that is managed by the customer. KMS key versions will be + // populated. + EncryptionType string `json:"encryptionType,omitempty"` + + // KmsKeyVersions: Output only. Cloud KMS key versions that are being + // used to protect the database or the backup. + KmsKeyVersions []string `json:"kmsKeyVersions,omitempty"` + + // ForceSendFields is a list of field names (e.g. "EncryptionType") 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. "EncryptionType") 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 *EncryptionInfo) MarshalJSON() ([]byte, error) { + type NoMethod EncryptionInfo + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// FailoverInstanceRequest: Message for triggering failover on an +// Instance +type FailoverInstanceRequest struct { + // RequestId: Optional. An optional request ID to identify requests. + // Specify a unique request ID so that if you must retry your request, + // the server will know to ignore the request if it has already been + // completed. The server will guarantee that for at least 60 minutes + // after the first request. For example, consider a situation where you + // make an initial request and the request times out. If you make the + // request again with the same request ID, the server can check if + // original operation with the same request ID was received, and if so, + // will ignore the second request. This prevents clients from + // accidentally creating duplicate commitments. The request ID must be a + // valid UUID with the exception that zero UUID is not supported + // (00000000-0000-0000-0000-000000000000). + RequestId string `json:"requestId,omitempty"` + + // ValidateOnly: Optional. If set, performs request validation (e.g. + // permission checks and any other type of validation), but do not + // actually execute the failover. + ValidateOnly bool `json:"validateOnly,omitempty"` + + // ForceSendFields is a list of field names (e.g. "RequestId") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "RequestId") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *FailoverInstanceRequest) MarshalJSON() ([]byte, error) { + type NoMethod FailoverInstanceRequest + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// GenerateClientCertificateRequest: Message for requests to generate a +// client certificate signed by the Cluster CA. +type GenerateClientCertificateRequest struct { + // CertDuration: Optional. An optional hint to the endpoint to generate + // the client certificate with the requested duration. The duration can + // be from 1 hour to 24 hours. The endpoint may or may not honor the + // hint. If the hint is left unspecified or is not honored, then the + // endpoint will pick an appropriate default duration. + CertDuration string `json:"certDuration,omitempty"` + + // PemCsr: Optional. A pem-encoded X.509 certificate signing request + // (CSR). + PemCsr string `json:"pemCsr,omitempty"` + + // PublicKey: Optional. The public key from the client. + PublicKey string `json:"publicKey,omitempty"` + + // RequestId: Optional. An optional request ID to identify requests. + // Specify a unique request ID so that if you must retry your request, + // the server will know to ignore the request if it has already been + // completed. The server will guarantee that for at least 60 minutes + // after the first request. For example, consider a situation where you + // make an initial request and the request times out. If you make the + // request again with the same request ID, the server can check if + // original operation with the same request ID was received, and if so, + // will ignore the second request. This prevents clients from + // accidentally creating duplicate commitments. The request ID must be a + // valid UUID with the exception that zero UUID is not supported + // (00000000-0000-0000-0000-000000000000). + RequestId string `json:"requestId,omitempty"` + + // UseMetadataExchange: Optional. An optional hint to the endpoint to + // generate a client ceritificate that can be used by AlloyDB connectors + // to exchange additional metadata with the server after TLS handshake. + UseMetadataExchange bool `json:"useMetadataExchange,omitempty"` + + // ForceSendFields is a list of field names (e.g. "CertDuration") 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. "CertDuration") 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 *GenerateClientCertificateRequest) MarshalJSON() ([]byte, error) { + type NoMethod GenerateClientCertificateRequest + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// GenerateClientCertificateResponse: Message returned by a +// GenerateClientCertificate operation. +type GenerateClientCertificateResponse struct { + // CaCert: Optional. The pem-encoded cluster ca X.509 certificate. + CaCert string `json:"caCert,omitempty"` + + // PemCertificate: Output only. The pem-encoded, signed X.509 + // certificate. + PemCertificate string `json:"pemCertificate,omitempty"` + + // PemCertificateChain: Output only. The pem-encoded chain that may be + // used to verify the X.509 certificate. Expected to be in + // issuer-to-root order according to RFC 5246. + PemCertificateChain []string `json:"pemCertificateChain,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the + // server. + googleapi.ServerResponse `json:"-"` + + // ForceSendFields is a list of field names (e.g. "CaCert") 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. "CaCert") 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 *GenerateClientCertificateResponse) MarshalJSON() ([]byte, error) { + type NoMethod GenerateClientCertificateResponse + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// GoogleCloudLocationListLocationsResponse: The response message for +// Locations.ListLocations. +type GoogleCloudLocationListLocationsResponse struct { + // Locations: A list of locations that matches the specified filter in + // the request. + Locations []*GoogleCloudLocationLocation `json:"locations,omitempty"` + + // NextPageToken: The standard List next-page token. + NextPageToken string `json:"nextPageToken,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the + // server. + googleapi.ServerResponse `json:"-"` + + // ForceSendFields is a list of field names (e.g. "Locations") 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. "Locations") 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 *GoogleCloudLocationListLocationsResponse) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudLocationListLocationsResponse + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// GoogleCloudLocationLocation: A resource that represents a Google +// Cloud location. +type GoogleCloudLocationLocation struct { + // DisplayName: The friendly name for this location, typically a nearby + // city name. For example, "Tokyo". + DisplayName string `json:"displayName,omitempty"` + + // Labels: Cross-service attributes for the location. For example + // {"cloud.googleapis.com/region": "us-east1"} + Labels map[string]string `json:"labels,omitempty"` + + // LocationId: The canonical id for this location. For example: + // "us-east1". + LocationId string `json:"locationId,omitempty"` + + // Metadata: Service-specific metadata. For example the available + // capacity at the given location. + Metadata googleapi.RawMessage `json:"metadata,omitempty"` + + // Name: Resource name for the location, which may vary between + // implementations. For example: + // "projects/example-project/locations/us-east1" + Name string `json:"name,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the + // server. + googleapi.ServerResponse `json:"-"` + + // ForceSendFields is a list of field names (e.g. "DisplayName") 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. "DisplayName") 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 *GoogleCloudLocationLocation) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudLocationLocation + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// GoogleTypeTimeOfDay: Represents a time of day. The date and time zone +// are either not significant or are specified elsewhere. An API may +// choose to allow leap seconds. Related types are google.type.Date and +// `google.protobuf.Timestamp`. +type GoogleTypeTimeOfDay struct { + // Hours: Hours of day in 24 hour format. Should be from 0 to 23. An API + // may choose to allow the value "24:00:00" for scenarios like business + // closing time. + Hours int64 `json:"hours,omitempty"` + + // Minutes: Minutes of hour of day. Must be from 0 to 59. + Minutes int64 `json:"minutes,omitempty"` + + // Nanos: Fractions of seconds in nanoseconds. Must be from 0 to + // 999,999,999. + Nanos int64 `json:"nanos,omitempty"` + + // Seconds: Seconds of minutes of the time. Must normally be from 0 to + // 59. An API may allow the value 60 if it allows leap-seconds. + Seconds int64 `json:"seconds,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Hours") 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. "Hours") 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 *GoogleTypeTimeOfDay) MarshalJSON() ([]byte, error) { + type NoMethod GoogleTypeTimeOfDay + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// InjectFaultRequest: Message for triggering fault injection on an +// instance +type InjectFaultRequest struct { + // FaultType: Required. The type of fault to be injected in an instance. + // + // Possible values: + // "FAULT_TYPE_UNSPECIFIED" - The fault type is unknown. + // "STOP_VM" - Stop the VM + FaultType string `json:"faultType,omitempty"` + + // RequestId: Optional. An optional request ID to identify requests. + // Specify a unique request ID so that if you must retry your request, + // the server will know to ignore the request if it has already been + // completed. The server will guarantee that for at least 60 minutes + // after the first request. For example, consider a situation where you + // make an initial request and the request times out. If you make the + // request again with the same request ID, the server can check if + // original operation with the same request ID was received, and if so, + // will ignore the second request. This prevents clients from + // accidentally creating duplicate commitments. The request ID must be a + // valid UUID with the exception that zero UUID is not supported + // (00000000-0000-0000-0000-000000000000). + RequestId string `json:"requestId,omitempty"` + + // ValidateOnly: Optional. If set, performs request validation (e.g. + // permission checks and any other type of validation), but do not + // actually execute the fault injection. + ValidateOnly bool `json:"validateOnly,omitempty"` + + // ForceSendFields is a list of field names (e.g. "FaultType") 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. "FaultType") 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 *InjectFaultRequest) MarshalJSON() ([]byte, error) { + type NoMethod InjectFaultRequest + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// Instance: An Instance is a computing unit that an end customer can +// connect to. It's the main unit of computing resources in AlloyDB. +type Instance struct { + // Annotations: Annotations to allow client tools to store small amount + // of arbitrary data. This is distinct from labels. + // https://google.aip.dev/128 + Annotations map[string]string `json:"annotations,omitempty"` + + // AvailabilityType: Availability type of an Instance. If empty, + // defaults to REGIONAL for primary instances. For read pools, + // availability_type is always UNSPECIFIED. Instances in the read pools + // are evenly distributed across available zones within the region (i.e. + // read pools with more than one node will have a node in at least two + // zones). + // + // Possible values: + // "AVAILABILITY_TYPE_UNSPECIFIED" - This is an unknown Availability + // type. + // "ZONAL" - Zonal available instance. + // "REGIONAL" - Regional (or Highly) available instance. + AvailabilityType string `json:"availabilityType,omitempty"` + + // ClientConnectionConfig: Optional. Client connection specific + // configurations + ClientConnectionConfig *ClientConnectionConfig `json:"clientConnectionConfig,omitempty"` + + // CreateTime: Output only. Create time stamp + CreateTime string `json:"createTime,omitempty"` + + // DatabaseFlags: Database flags. Set at instance level. * They are + // copied from primary instance on read instance creation. * Read + // instances can set new or override existing flags that are relevant + // for reads, e.g. for enabling columnar cache on a read instance. Flags + // set on read instance may or may not be present on primary. This is a + // list of "key": "value" pairs. "key": The name of the flag. These + // flags are passed at instance setup time, so include both server + // options and system variables for Postgres. Flags are specified with + // underscores, not hyphens. "value": The value of the flag. Booleans + // are set to **on** for true and **off** for false. This field must be + // omitted if the flag doesn't take a value. + DatabaseFlags map[string]string `json:"databaseFlags,omitempty"` + + // DeleteTime: Output only. Delete time stamp + DeleteTime string `json:"deleteTime,omitempty"` + + // DisplayName: User-settable and human-readable display name for the + // Instance. + DisplayName string `json:"displayName,omitempty"` + + // Etag: For Resource freshness validation (https://google.aip.dev/154) + Etag string `json:"etag,omitempty"` + + // GceZone: The Compute Engine zone that the instance should serve from, + // per https://cloud.google.com/compute/docs/regions-zones This can ONLY + // be specified for ZONAL instances. If present for a REGIONAL instance, + // an error will be thrown. If this is absent for a ZONAL instance, + // instance is created in a random zone with available capacity. + GceZone string `json:"gceZone,omitempty"` + + // InstanceType: Required. The type of the instance. Specified at + // creation time. + // + // Possible values: + // "INSTANCE_TYPE_UNSPECIFIED" - The type of the instance is unknown. + // "PRIMARY" - PRIMARY instances support read and write operations. + // "READ_POOL" - READ POOL instances support read operations only. + // Each read pool instance consists of one or more homogeneous nodes. * + // Read pool of size 1 can only have zonal availability. * Read pools + // with node count of 2 or more can have regional availability (nodes + // are present in 2 or more zones in a region). + // "SECONDARY" - SECONDARY instances support read operations only. + // SECONDARY instance is a cross-region read replica + InstanceType string `json:"instanceType,omitempty"` + + // IpAddress: Output only. The IP address for the Instance. This is the + // connection endpoint for an end-user application. + IpAddress string `json:"ipAddress,omitempty"` + + // Labels: Labels as key value pairs + Labels map[string]string `json:"labels,omitempty"` + + // MachineConfig: Configurations for the machines that host the + // underlying database engine. + MachineConfig *MachineConfig `json:"machineConfig,omitempty"` + + // Name: Output only. The name of the instance resource with the format: + // * + // projects/{project}/locations/{region}/clusters/{cluster_id}/instances/ + // {instance_id} where the cluster and instance ID segments should + // satisfy the regex expression `[a-z]([a-z0-9-]{0,61}[a-z0-9])?`, e.g. + // 1-63 characters of lowercase letters, numbers, and dashes, starting + // with a letter, and ending with a letter or number. For more details + // see https://google.aip.dev/122. The prefix of the instance resource + // name is the name of the parent resource: * + // projects/{project}/locations/{region}/clusters/{cluster_id} + Name string `json:"name,omitempty"` + + // Nodes: Output only. List of available read-only VMs in this instance, + // including the standby for a PRIMARY instance. + Nodes []*Node `json:"nodes,omitempty"` + + // QueryInsightsConfig: Configuration for query insights. + QueryInsightsConfig *QueryInsightsInstanceConfig `json:"queryInsightsConfig,omitempty"` + + // ReadPoolConfig: Read pool specific config. + ReadPoolConfig *ReadPoolConfig `json:"readPoolConfig,omitempty"` + + // Reconciling: Output only. Reconciling + // (https://google.aip.dev/128#reconciliation). Set to true if the + // current state of Instance does not match the user's intended state, + // and the service is actively updating the resource to reconcile them. + // This can happen due to user-triggered updates or system actions like + // failover or maintenance. + Reconciling bool `json:"reconciling,omitempty"` + + // State: Output only. The current serving state of the instance. + // + // Possible values: + // "STATE_UNSPECIFIED" - The state of the instance is unknown. + // "READY" - The instance is active and running. + // "STOPPED" - The instance is stopped. Instance name and IP resources + // are preserved. + // "CREATING" - The instance is being created. + // "DELETING" - The instance is being deleted. + // "MAINTENANCE" - The instance is down for maintenance. + // "FAILED" - The creation of the instance failed or a fatal error + // occurred during an operation on the instance. Note: Instances in this + // state would tried to be auto-repaired. And Customers should be able + // to restart, update or delete these instances. + // "BOOTSTRAPPING" - Index 7 is used in the producer apis for + // ROLLED_BACK state. Keeping that index unused in case that state also + // needs to exposed via consumer apis in future. The instance has been + // configured to sync data from some other source. + // "PROMOTING" - The instance is being promoted. + State string `json:"state,omitempty"` + + // Uid: Output only. The system-generated UID of the resource. The UID + // is assigned when the resource is created, and it is retained until it + // is deleted. + Uid string `json:"uid,omitempty"` + + // UpdatePolicy: Update policy that will be applied during instance + // update. This field is not persisted when you update the instance. To + // use a non-default update policy, you must specify explicitly specify + // the value in each update request. + UpdatePolicy *UpdatePolicy `json:"updatePolicy,omitempty"` + + // UpdateTime: Output only. Update time stamp + UpdateTime string `json:"updateTime,omitempty"` + + // WritableNode: Output only. This is set for the read-write VM of the + // PRIMARY instance only. + WritableNode *Node `json:"writableNode,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the + // server. + googleapi.ServerResponse `json:"-"` + + // ForceSendFields is a list of field names (e.g. "Annotations") 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. "Annotations") 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 *Instance) MarshalJSON() ([]byte, error) { + type NoMethod Instance + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// IntegerRestrictions: Restrictions on INTEGER type values. +type IntegerRestrictions struct { + // MaxValue: The maximum value that can be specified, if applicable. + MaxValue int64 `json:"maxValue,omitempty,string"` + + // MinValue: The minimum value that can be specified, if applicable. + MinValue int64 `json:"minValue,omitempty,string"` + + // ForceSendFields is a list of field names (e.g. "MaxValue") 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. "MaxValue") 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 *IntegerRestrictions) MarshalJSON() ([]byte, error) { + type NoMethod IntegerRestrictions + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// ListBackupsResponse: Message for response to listing Backups +type ListBackupsResponse struct { + // Backups: The list of Backup + Backups []*Backup `json:"backups,omitempty"` + + // NextPageToken: A token identifying a page of results the server + // should return. + NextPageToken string `json:"nextPageToken,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. "Backups") 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. "Backups") 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 *ListBackupsResponse) MarshalJSON() ([]byte, error) { + type NoMethod ListBackupsResponse + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// ListClustersResponse: Message for response to listing Clusters +type ListClustersResponse struct { + // Clusters: The list of Cluster + Clusters []*Cluster `json:"clusters,omitempty"` + + // NextPageToken: A token identifying a page of results the server + // should return. + NextPageToken string `json:"nextPageToken,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. "Clusters") 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. "Clusters") 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 *ListClustersResponse) MarshalJSON() ([]byte, error) { + type NoMethod ListClustersResponse + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// ListInstancesResponse: Message for response to listing Instances +type ListInstancesResponse struct { + // Instances: The list of Instance + Instances []*Instance `json:"instances,omitempty"` + + // NextPageToken: A token identifying a page of results the server + // should return. + NextPageToken string `json:"nextPageToken,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. "Instances") 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. "Instances") 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 *ListInstancesResponse) MarshalJSON() ([]byte, error) { + type NoMethod ListInstancesResponse + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// ListOperationsResponse: The response message for +// Operations.ListOperations. +type ListOperationsResponse struct { + // NextPageToken: The standard List next-page token. + NextPageToken string `json:"nextPageToken,omitempty"` + + // Operations: A list of operations that matches the specified filter in + // the request. + Operations []*Operation `json:"operations,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 *ListOperationsResponse) MarshalJSON() ([]byte, error) { + type NoMethod ListOperationsResponse + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// ListSupportedDatabaseFlagsResponse: Message for response to listing +// SupportedDatabaseFlags. +type ListSupportedDatabaseFlagsResponse struct { + // NextPageToken: A token identifying a page of results the server + // should return. + NextPageToken string `json:"nextPageToken,omitempty"` + + // SupportedDatabaseFlags: The list of SupportedDatabaseFlags. + SupportedDatabaseFlags []*SupportedDatabaseFlag `json:"supportedDatabaseFlags,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 *ListSupportedDatabaseFlagsResponse) MarshalJSON() ([]byte, error) { + type NoMethod ListSupportedDatabaseFlagsResponse + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// ListUsersResponse: Message for response to listing Users +type ListUsersResponse struct { + // NextPageToken: A token identifying a page of results the server + // should return. + NextPageToken string `json:"nextPageToken,omitempty"` + + // Unreachable: Locations that could not be reached. + Unreachable []string `json:"unreachable,omitempty"` + + // Users: The list of User + Users []*User `json:"users,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 *ListUsersResponse) MarshalJSON() ([]byte, error) { + type NoMethod ListUsersResponse + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// MachineConfig: MachineConfig describes the configuration of a +// machine. +type MachineConfig struct { + // CpuCount: The number of CPU's in the VM instance. + CpuCount int64 `json:"cpuCount,omitempty"` + + // ForceSendFields is a list of field names (e.g. "CpuCount") 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. "CpuCount") 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 *MachineConfig) MarshalJSON() ([]byte, error) { + type NoMethod MachineConfig + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// MigrationSource: Subset of the source instance configuration that is +// available when reading the cluster resource. +type MigrationSource struct { + // HostPort: Output only. The host and port of the on-premises instance + // in host:port format + HostPort string `json:"hostPort,omitempty"` + + // ReferenceId: Output only. Place holder for the external source + // identifier(e.g DMS job name) that created the cluster. + ReferenceId string `json:"referenceId,omitempty"` + + // SourceType: Output only. Type of migration source. + // + // Possible values: + // "MIGRATION_SOURCE_TYPE_UNSPECIFIED" - Migration source is unknown. + // "DMS" - DMS source means the cluster was created via DMS migration + // job. + SourceType string `json:"sourceType,omitempty"` + + // ForceSendFields is a list of field names (e.g. "HostPort") 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. "HostPort") 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 *MigrationSource) MarshalJSON() ([]byte, error) { + type NoMethod MigrationSource + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// NetworkConfig: Metadata related to network configuration. +type NetworkConfig struct { + // AllocatedIpRange: Optional. Name of the allocated IP range for the + // private IP AlloyDB cluster, for example: + // "google-managed-services-default". If set, the instance IPs for this + // cluster will be created in the allocated range. The range name must + // comply with RFC 1035. Specifically, the name must be 1-63 characters + // long and match the regular expression a-z ([-a-z0-9]*[a-z0-9])?. + // Field name is intended to be consistent with CloudSQL. + AllocatedIpRange string `json:"allocatedIpRange,omitempty"` + + // Network: Required. The resource link for the VPC network in which + // cluster resources are created and from which they are accessible via + // Private IP. The network must belong to the same project as the + // cluster. It is specified in the form: + // "projects/{project_number}/global/networks/{network_id}". This is + // required to create a cluster. It can be updated, but it cannot be + // removed. + Network string `json:"network,omitempty"` + + // ForceSendFields is a list of field names (e.g. "AllocatedIpRange") 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. "AllocatedIpRange") 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 *NetworkConfig) MarshalJSON() ([]byte, error) { + type NoMethod NetworkConfig + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// Node: Details of a single node in the instance. Nodes in an AlloyDB +// instance are ephemereal, they can change during update, failover, +// autohealing and resize operations. +type Node struct { + // Id: The identifier of the VM e.g. "test-read-0601-407e52be-ms3l". + Id string `json:"id,omitempty"` + + // Ip: The private IP address of the VM e.g. "10.57.0.34". + Ip string `json:"ip,omitempty"` + + // State: Determined by state of the compute VM and postgres-service + // health. Compute VM state can have values listed in + // https://cloud.google.com/compute/docs/instances/instance-life-cycle + // and postgres-service health can have values: HEALTHY and UNHEALTHY. + State string `json:"state,omitempty"` + + // ZoneId: The Compute Engine zone of the VM e.g. "us-central1-b". + ZoneId string `json:"zoneId,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 *Node) MarshalJSON() ([]byte, error) { + type NoMethod Node + 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 { + // Done: If the value is `false`, it means the operation is still in + // progress. If `true`, the operation is completed, and either `error` + // or `response` is available. + Done bool `json:"done,omitempty"` + + // Error: The error result of the operation in case of failure or + // cancellation. + Error *Status `json:"error,omitempty"` + + // Metadata: Service-specific metadata associated with the operation. It + // typically contains progress information and common metadata such as + // create time. Some services might not provide such metadata. Any + // method that returns a long-running operation should document the + // metadata type, if any. + Metadata googleapi.RawMessage `json:"metadata,omitempty"` + + // Name: The server-assigned name, which is only unique within the same + // service that originally returns it. If you use the default HTTP + // mapping, the `name` should be a resource name ending with + // `operations/{unique_id}`. + Name string `json:"name,omitempty"` + + // Response: The normal, successful response of the operation. If the + // original method returns no data on success, such as `Delete`, the + // response is `google.protobuf.Empty`. If the original method is + // standard `Get`/`Create`/`Update`, the response should be the + // resource. For other methods, the response should have the type + // `XxxResponse`, where `Xxx` is the original method name. For example, + // if the original method name is `TakeSnapshot()`, the inferred + // response type is `TakeSnapshotResponse`. + Response googleapi.RawMessage `json:"response,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the + // server. + googleapi.ServerResponse `json:"-"` + + // ForceSendFields is a list of field names (e.g. "Done") 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. "Done") 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 *Operation) MarshalJSON() ([]byte, error) { + type NoMethod Operation + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// OperationMetadata: Represents the metadata of the long-running +// operation. +type OperationMetadata struct { + // ApiVersion: Output only. API version used to start the operation. + ApiVersion string `json:"apiVersion,omitempty"` + + // CreateTime: Output only. The time the operation was created. + CreateTime string `json:"createTime,omitempty"` + + // EndTime: Output only. The time the operation finished running. + EndTime string `json:"endTime,omitempty"` + + // RequestedCancellation: Output only. Identifies whether the user has + // requested cancellation of the operation. Operations that have + // successfully been cancelled have Operation.error value with a + // google.rpc.Status.code of 1, corresponding to `Code.CANCELLED`. + RequestedCancellation bool `json:"requestedCancellation,omitempty"` + + // StatusMessage: Output only. Human-readable status of the operation, + // if any. + StatusMessage string `json:"statusMessage,omitempty"` + + // Target: Output only. Server-defined resource path for the target of + // the operation. + Target string `json:"target,omitempty"` + + // Verb: Output only. Name of the verb executed by the operation. + Verb string `json:"verb,omitempty"` + + // ForceSendFields is a list of field names (e.g. "ApiVersion") 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. "ApiVersion") 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 *OperationMetadata) MarshalJSON() ([]byte, error) { + type NoMethod OperationMetadata + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// PrimaryConfig: Configuration for the primary cluster. It has the list +// of clusters that are replicating from this cluster. This should be +// set if and only if the cluster is of type PRIMARY. +type PrimaryConfig struct { + // SecondaryClusterNames: Output only. Names of the clusters that are + // replicating from this cluster. + SecondaryClusterNames []string `json:"secondaryClusterNames,omitempty"` + + // ForceSendFields is a list of field names (e.g. + // "SecondaryClusterNames") 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. "SecondaryClusterNames") 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 *PrimaryConfig) MarshalJSON() ([]byte, error) { + type NoMethod PrimaryConfig + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// PromoteClusterRequest: Message for promoting a Cluster +type PromoteClusterRequest struct { + // Etag: Optional. The current etag of the Cluster. If an etag is + // provided and does not match the current etag of the Cluster, deletion + // will be blocked and an ABORTED error will be returned. + Etag string `json:"etag,omitempty"` + + // RequestId: Optional. An optional request ID to identify requests. + // Specify a unique request ID so that if you must retry your request, + // the server will know to ignore the request if it has already been + // completed. The server will guarantee that for at least 60 minutes + // after the first request. For example, consider a situation where you + // make an initial request and the request times out. If you make the + // request again with the same request ID, the server can check if + // original operation with the same request ID was received, and if so, + // will ignore the second request. This prevents clients from + // accidentally creating duplicate commitments. The request ID must be a + // valid UUID with the exception that zero UUID is not supported + // (00000000-0000-0000-0000-000000000000). + RequestId string `json:"requestId,omitempty"` + + // ValidateOnly: Optional. If set, performs request validation (e.g. + // permission checks and any other type of validation), but do not + // actually execute the delete. + ValidateOnly bool `json:"validateOnly,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Etag") 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. "Etag") 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 *PromoteClusterRequest) MarshalJSON() ([]byte, error) { + type NoMethod PromoteClusterRequest + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// QuantityBasedExpiry: A backup's position in a quantity-based +// retention queue, of backups with the same source cluster and type, +// with length, retention, specified by the backup's retention policy. +// Once the position is greater than the retention, the backup is +// eligible to be garbage collected. Example: 5 backups from the same +// source cluster and type with a quantity-based retention of 3 and +// denoted by backup_id (position, retention). Safe: backup_5 (1, 3), +// backup_4, (2, 3), backup_3 (3, 3). Awaiting garbage collection: +// backup_2 (4, 3), backup_1 (5, 3) +type QuantityBasedExpiry struct { + // RetentionCount: Output only. The backup's position among its backups + // with the same source cluster and type, by descending chronological + // order create time(i.e. newest first). + RetentionCount int64 `json:"retentionCount,omitempty"` + + // TotalRetentionCount: Output only. The length of the quantity-based + // queue, specified by the backup's retention policy. + TotalRetentionCount int64 `json:"totalRetentionCount,omitempty"` + + // ForceSendFields is a list of field names (e.g. "RetentionCount") 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. "RetentionCount") 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 *QuantityBasedExpiry) MarshalJSON() ([]byte, error) { + type NoMethod QuantityBasedExpiry + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// QuantityBasedRetention: A quantity based policy specifies that a +// certain number of the most recent successful backups should be +// retained. +type QuantityBasedRetention struct { + // Count: The number of backups to retain. + Count int64 `json:"count,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Count") 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. "Count") 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 *QuantityBasedRetention) MarshalJSON() ([]byte, error) { + type NoMethod QuantityBasedRetention + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// QueryInsightsInstanceConfig: QueryInsights Instance specific +// configuration. +type QueryInsightsInstanceConfig struct { + // QueryPlansPerMinute: Number of query execution plans captured by + // Insights per minute for all queries combined. The default value is 5. + // Any integer between 0 and 20 is considered valid. + QueryPlansPerMinute int64 `json:"queryPlansPerMinute,omitempty"` + + // QueryStringLength: Query string length. The default value is 1024. + // Any integer between 256 and 4500 is considered valid. + QueryStringLength int64 `json:"queryStringLength,omitempty"` + + // RecordApplicationTags: Record application tags for an instance. This + // flag is turned "on" by default. + RecordApplicationTags bool `json:"recordApplicationTags,omitempty"` + + // RecordClientAddress: Record client address for an instance. Client + // address is PII information. This flag is turned "on" by default. + RecordClientAddress bool `json:"recordClientAddress,omitempty"` + + // ForceSendFields is a list of field names (e.g. "QueryPlansPerMinute") + // 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. "QueryPlansPerMinute") 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 *QueryInsightsInstanceConfig) MarshalJSON() ([]byte, error) { + type NoMethod QueryInsightsInstanceConfig + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// ReadPoolConfig: Configuration for a read pool instance. +type ReadPoolConfig struct { + // NodeCount: Read capacity, i.e. number of nodes in a read pool + // instance. + NodeCount int64 `json:"nodeCount,omitempty"` + + // ForceSendFields is a list of field names (e.g. "NodeCount") 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. "NodeCount") 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 *ReadPoolConfig) MarshalJSON() ([]byte, error) { + type NoMethod ReadPoolConfig + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +type RestartInstanceRequest struct { + // RequestId: Optional. An optional request ID to identify requests. + // Specify a unique request ID so that if you must retry your request, + // the server will know to ignore the request if it has already been + // completed. The server will guarantee that for at least 60 minutes + // after the first request. For example, consider a situation where you + // make an initial request and the request times out. If you make the + // request again with the same request ID, the server can check if + // original operation with the same request ID was received, and if so, + // will ignore the second request. This prevents clients from + // accidentally creating duplicate commitments. The request ID must be a + // valid UUID with the exception that zero UUID is not supported + // (00000000-0000-0000-0000-000000000000). + RequestId string `json:"requestId,omitempty"` + + // ValidateOnly: Optional. If set, performs request validation (e.g. + // permission checks and any other type of validation), but do not + // actually execute the restart. + ValidateOnly bool `json:"validateOnly,omitempty"` + + // ForceSendFields is a list of field names (e.g. "RequestId") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "RequestId") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *RestartInstanceRequest) MarshalJSON() ([]byte, error) { + type NoMethod RestartInstanceRequest + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// RestoreClusterRequest: Message for restoring a Cluster from a backup +// or another cluster at a given point in time. +type RestoreClusterRequest struct { + // BackupSource: Backup source. + BackupSource *BackupSource `json:"backupSource,omitempty"` + + // Cluster: Required. The resource being created + Cluster *Cluster `json:"cluster,omitempty"` + + // ClusterId: Required. ID of the requesting object. + ClusterId string `json:"clusterId,omitempty"` + + // ContinuousBackupSource: ContinuousBackup source. Continuous backup + // needs to be enabled in the source cluster for this operation to + // succeed. + ContinuousBackupSource *ContinuousBackupSource `json:"continuousBackupSource,omitempty"` + + // RequestId: Optional. An optional request ID to identify requests. + // Specify a unique request ID so that if you must retry your request, + // the server will know to ignore the request if it has already been + // completed. The server will guarantee that for at least 60 minutes + // since the first request. For example, consider a situation where you + // make an initial request and the request times out. If you make the + // request again with the same request ID, the server can check if + // original operation with the same request ID was received, and if so, + // will ignore the second request. This prevents clients from + // accidentally creating duplicate commitments. The request ID must be a + // valid UUID with the exception that zero UUID is not supported + // (00000000-0000-0000-0000-000000000000). + RequestId string `json:"requestId,omitempty"` + + // ValidateOnly: Optional. If set, performs request validation (e.g. + // permission checks and any other type of validation), but do not + // actually execute the import request. + ValidateOnly bool `json:"validateOnly,omitempty"` + + // ForceSendFields is a list of field names (e.g. "BackupSource") 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. "BackupSource") 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 *RestoreClusterRequest) MarshalJSON() ([]byte, error) { + type NoMethod RestoreClusterRequest + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// SecondaryConfig: Configuration information for the secondary cluster. +// This should be set if and only if the cluster is of type SECONDARY. +type SecondaryConfig struct { + // PrimaryClusterName: The name of the primary cluster name with the + // format: * projects/{project}/locations/{region}/clusters/{cluster_id} + PrimaryClusterName string `json:"primaryClusterName,omitempty"` + + // ForceSendFields is a list of field names (e.g. "PrimaryClusterName") + // 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. "PrimaryClusterName") 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 *SecondaryConfig) MarshalJSON() ([]byte, error) { + type NoMethod SecondaryConfig + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// SslConfig: SSL configuration. +type SslConfig struct { + // CaSource: Optional. Certificate Authority (CA) source. Only + // CA_SOURCE_MANAGED is supported currently, and is the default value. + // + // Possible values: + // "CA_SOURCE_UNSPECIFIED" - Certificate Authority (CA) source not + // specified. Defaults to CA_SOURCE_MANAGED. + // "CA_SOURCE_MANAGED" - Certificate Authority (CA) managed by the + // AlloyDB Cluster. + CaSource string `json:"caSource,omitempty"` + + // SslMode: Optional. SSL mode. Specifies client-server SSL/TLS + // connection behavior. + // + // Possible values: + // "SSL_MODE_UNSPECIFIED" - SSL mode not specified. Defaults to + // ENCRYPTED_ONLY. + // "SSL_MODE_ALLOW" - SSL connections are optional. CA verification + // not enforced. + // "SSL_MODE_REQUIRE" - SSL connections are required. CA verification + // not enforced. Clients may use locally self-signed certificates + // (default psql client behavior). + // "SSL_MODE_VERIFY_CA" - SSL connections are required. CA + // verification enforced. Clients must have certificates signed by a + // Cluster CA, e.g. via GenerateClientCertificate. + // "ALLOW_UNENCRYPTED_AND_ENCRYPTED" - SSL connections are optional. + // CA verification not enforced. + // "ENCRYPTED_ONLY" - SSL connections are required. CA verification + // not enforced. + SslMode string `json:"sslMode,omitempty"` + + // ForceSendFields is a list of field names (e.g. "CaSource") 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. "CaSource") 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 *SslConfig) MarshalJSON() ([]byte, error) { + type NoMethod SslConfig + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// Status: The `Status` type defines a logical error model that is +// suitable for different programming environments, including REST APIs +// and RPC APIs. It is used by gRPC (https://github.com/grpc). Each +// `Status` message contains three pieces of data: error code, error +// message, and error details. You can find out more about this error +// model and how to work with it in the API Design Guide +// (https://cloud.google.com/apis/design/errors). +type Status struct { + // Code: The status code, which should be an enum value of + // google.rpc.Code. + Code int64 `json:"code,omitempty"` + + // Details: A list of messages that carry the error details. There is a + // common set of message types for APIs to use. + Details []googleapi.RawMessage `json:"details,omitempty"` + + // Message: A developer-facing error message, which should be in + // English. Any user-facing error message should be localized and sent + // in the google.rpc.Status.details field, or localized by the client. + Message string `json:"message,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Code") 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. "Code") 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 *Status) MarshalJSON() ([]byte, error) { + type NoMethod Status + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// StorageDatabasecenterPartnerapiV1mainAvailabilityConfiguration: +// Configuration for availability of database instance +type StorageDatabasecenterPartnerapiV1mainAvailabilityConfiguration struct { + // AvailabilityType: Availability type. Potential values: * `ZONAL`: The + // instance serves data from only one zone. Outages in that zone affect + // data accessibility. * `REGIONAL`: The instance can serve data from + // more than one zone in a region (it is highly available). + // + // Possible values: + // "AVAILABILITY_TYPE_UNSPECIFIED" + // "ZONAL" - Zonal available instance. + // "REGIONAL" - Regional available instance. + // "MULTI_REGIONAL" - Multi regional instance + // "AVAILABILITY_TYPE_OTHER" - For rest of the other category + AvailabilityType string `json:"availabilityType,omitempty"` + + ExternalReplicaConfigured bool `json:"externalReplicaConfigured,omitempty"` + + PromotableReplicaConfigured bool `json:"promotableReplicaConfigured,omitempty"` + + // ForceSendFields is a list of field names (e.g. "AvailabilityType") 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. "AvailabilityType") 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 *StorageDatabasecenterPartnerapiV1mainAvailabilityConfiguration) MarshalJSON() ([]byte, error) { + type NoMethod StorageDatabasecenterPartnerapiV1mainAvailabilityConfiguration + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// StorageDatabasecenterPartnerapiV1mainBackupConfiguration: +// Configuration for automatic backups +type StorageDatabasecenterPartnerapiV1mainBackupConfiguration struct { + // AutomatedBackupEnabled: Whether customer visible automated backups + // are enabled on the instance. + AutomatedBackupEnabled bool `json:"automatedBackupEnabled,omitempty"` + + // BackupRetentionSettings: Backup retention settings. + BackupRetentionSettings *StorageDatabasecenterPartnerapiV1mainRetentionSettings `json:"backupRetentionSettings,omitempty"` + + // ForceSendFields is a list of field names (e.g. + // "AutomatedBackupEnabled") 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. "AutomatedBackupEnabled") + // 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 *StorageDatabasecenterPartnerapiV1mainBackupConfiguration) MarshalJSON() ([]byte, error) { + type NoMethod StorageDatabasecenterPartnerapiV1mainBackupConfiguration + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// StorageDatabasecenterPartnerapiV1mainBackupRun: A backup run. +type StorageDatabasecenterPartnerapiV1mainBackupRun struct { + // EndTime: The time the backup operation completed. REQUIRED + EndTime string `json:"endTime,omitempty"` + + // Error: Information about why the backup operation failed. This is + // only present if the run has the FAILED status. OPTIONAL + Error *StorageDatabasecenterPartnerapiV1mainOperationError `json:"error,omitempty"` + + // StartTime: The time the backup operation started. REQUIRED + StartTime string `json:"startTime,omitempty"` + + // Status: The status of this run. REQUIRED + // + // Possible values: + // "STATUS_UNSPECIFIED" + // "SUCCESSFUL" - The backup was successful. + // "FAILED" - The backup was unsuccessful. + Status string `json:"status,omitempty"` + + // ForceSendFields is a list of field names (e.g. "EndTime") 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. "EndTime") 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 *StorageDatabasecenterPartnerapiV1mainBackupRun) MarshalJSON() ([]byte, error) { + type NoMethod StorageDatabasecenterPartnerapiV1mainBackupRun + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// StorageDatabasecenterPartnerapiV1mainDatabaseResourceFeed: +// DatabaseResourceFeed is the top level proto to be used to ingest +// different database resource level events into Condor platform. +type StorageDatabasecenterPartnerapiV1mainDatabaseResourceFeed struct { + // FeedTimestamp: Required. Timestamp when feed is generated. + FeedTimestamp string `json:"feedTimestamp,omitempty"` + + // FeedType: Required. Type feed to be ingested into condor + // + // Possible values: + // "FEEDTYPE_UNSPECIFIED" + // "RESOURCE_METADATA" - Database resource metadata feed from control + // plane + // "OBSERVABILITY_DATA" - Database resource monitoring data + // "COMPLIANCE_DATA" - Database resource compliance feed + FeedType string `json:"feedType,omitempty"` + + // ResourceId: Required. Primary key associated with the Resource + ResourceId *StorageDatabasecenterPartnerapiV1mainDatabaseResourceId `json:"resourceId,omitempty"` + + // ResourceMetadata: More feed data would be added in subsequent CLs + ResourceMetadata *StorageDatabasecenterPartnerapiV1mainDatabaseResourceMetadata `json:"resourceMetadata,omitempty"` + + // ForceSendFields is a list of field names (e.g. "FeedTimestamp") 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. "FeedTimestamp") 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 *StorageDatabasecenterPartnerapiV1mainDatabaseResourceFeed) MarshalJSON() ([]byte, error) { + type NoMethod StorageDatabasecenterPartnerapiV1mainDatabaseResourceFeed + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// StorageDatabasecenterPartnerapiV1mainDatabaseResourceId: +// DatabaseResourceId will serve as primary key for any resource +// ingestion event. +type StorageDatabasecenterPartnerapiV1mainDatabaseResourceId struct { + // Provider: Required. Cloud provider name. Ex: + // GCP/AWS/Azure/OnPrem/SelfManaged + // + // Possible values: + // "PROVIDER_UNSPECIFIED" + // "GCP" - Google cloud platform provider + // "AWS" - Amazon web service + // "AZURE" - Azure web service + // "ONPREM" - On-prem database provider + // "SELFMANAGED" - Self-managed database provider + // "PROVIDER_OTHER" - For rest of the other category + Provider string `json:"provider,omitempty"` + + // ResourceType: Required. The type of resource this ID is identifying. + // Ex google.sqladmin.Instance, google.alloydb.cluster, + // google.sqladmin.Backup REQUIRED + ResourceType string `json:"resourceType,omitempty"` + + // UniqueId: Required. A service-local token that distinguishes this + // resource from other resources within the same service. + UniqueId string `json:"uniqueId,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Provider") 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. "Provider") 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 *StorageDatabasecenterPartnerapiV1mainDatabaseResourceId) MarshalJSON() ([]byte, error) { + type NoMethod StorageDatabasecenterPartnerapiV1mainDatabaseResourceId + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// StorageDatabasecenterPartnerapiV1mainDatabaseResourceMetadata: Common +// model for database resource instance metadata. +type StorageDatabasecenterPartnerapiV1mainDatabaseResourceMetadata struct { + // AvailabilityConfiguration: Availability configuration for this + // instance + AvailabilityConfiguration *StorageDatabasecenterPartnerapiV1mainAvailabilityConfiguration `json:"availabilityConfiguration,omitempty"` + + // BackupConfiguration: Backup configuration for this instance + BackupConfiguration *StorageDatabasecenterPartnerapiV1mainBackupConfiguration `json:"backupConfiguration,omitempty"` + + // BackupRun: Latest backup run information for this instance + BackupRun *StorageDatabasecenterPartnerapiV1mainBackupRun `json:"backupRun,omitempty"` + + // CreationTime: The creation time of the resource, i.e. the time when + // resource is created and recorded in partner service. + CreationTime string `json:"creationTime,omitempty"` + + // CurrentState: Current state of the instance. + // + // Possible values: + // "STATE_UNSPECIFIED" + // "HEALTHY" - The instance is running. + // "UNHEALTHY" - Instance being created, updated, deleted or under + // maintenance + // "STATE_OTHER" - For rest of the other category + CurrentState string `json:"currentState,omitempty"` + + // ExpectedState: The actual instance state. + // + // Possible values: + // "STATE_UNSPECIFIED" + // "HEALTHY" - The instance is running. + // "UNHEALTHY" - Instance being created, updated, deleted or under + // maintenance + // "STATE_OTHER" - For rest of the other category + ExpectedState string `json:"expectedState,omitempty"` + + // Id: Required. Unique identifier for a Database resource + Id *StorageDatabasecenterPartnerapiV1mainDatabaseResourceId `json:"id,omitempty"` + + // InstanceType: The type of the instance. Specified at creation time. + // + // Possible values: + // "INSTANCE_TYPE_UNSPECIFIED" + // "PRIMARY" - A regular primary database instance. + // "READ_REPLICA" - An instance acting as a read-replica. + // "OTHER" - For rest of the other categories. + InstanceType string `json:"instanceType,omitempty"` + + // Location: The resource location. REQUIRED + Location string `json:"location,omitempty"` + + // PrimaryResourceId: Unique identifier for this resource's immediate + // parent resource. This parent resource id would be used to build + // resource hierarchy in condor platform. + PrimaryResourceId *StorageDatabasecenterPartnerapiV1mainDatabaseResourceId `json:"primaryResourceId,omitempty"` + + // Product: The product this resource represents. + Product *StorageDatabasecenterProtoCommonProduct `json:"product,omitempty"` + + // ResourceContainer: Closest parent Cloud Resource Manager container of + // this resource. It must either be resource name of a Cloud Resource + // Manager project, for ex: "projects/123". + ResourceContainer string `json:"resourceContainer,omitempty"` + + // ResourceName: Required. Different from unique_id, a resource name can + // be reused over time. That is after a resource named "ABC" is deleted, + // the name "ABC" can be used to to create a new resource within the + // same source. + ResourceName string `json:"resourceName,omitempty"` + + // UpdationTime: The time at which the resource was updated and recorded + // at partner service. + UpdationTime string `json:"updationTime,omitempty"` + + // UserLabels: User-provided labels, represented as a dictionary where + // each label is a single key value pair. + UserLabels map[string]string `json:"userLabels,omitempty"` + + // ForceSendFields is a list of field names (e.g. + // "AvailabilityConfiguration") 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. + // "AvailabilityConfiguration") 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 *StorageDatabasecenterPartnerapiV1mainDatabaseResourceMetadata) MarshalJSON() ([]byte, error) { + type NoMethod StorageDatabasecenterPartnerapiV1mainDatabaseResourceMetadata + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// StorageDatabasecenterPartnerapiV1mainOperationError: An error that +// occurred during a backup creation operation. +type StorageDatabasecenterPartnerapiV1mainOperationError struct { + // Code: Identifies the specific error that occurred. REQUIRED + Code string `json:"code,omitempty"` + + // Message: Additional information about the error encountered. REQUIRED + Message string `json:"message,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Code") 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. "Code") 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 *StorageDatabasecenterPartnerapiV1mainOperationError) MarshalJSON() ([]byte, error) { + type NoMethod StorageDatabasecenterPartnerapiV1mainOperationError + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +type StorageDatabasecenterPartnerapiV1mainRetentionSettings struct { + QuantityBasedRetention int64 `json:"quantityBasedRetention,omitempty"` + + // RetentionUnit: The unit that 'retained_backups' represents. + // + // Possible values: + // "RETENTION_UNIT_UNSPECIFIED" - Backup retention unit is + // unspecified, will be treated as COUNT. + // "COUNT" - Retention will be by count, eg. "retain the most recent 7 + // backups". + // "TIME" - Retention will be by Time, eg. "retain the last 7 days + // backups". + // "RETENTION_UNIT_OTHER" - For rest of the other category + RetentionUnit string `json:"retentionUnit,omitempty"` + + TimeBasedRetention string `json:"timeBasedRetention,omitempty"` + + // ForceSendFields is a list of field names (e.g. + // "QuantityBasedRetention") 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. "QuantityBasedRetention") + // 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 *StorageDatabasecenterPartnerapiV1mainRetentionSettings) MarshalJSON() ([]byte, error) { + type NoMethod StorageDatabasecenterPartnerapiV1mainRetentionSettings + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// StorageDatabasecenterProtoCommonProduct: Product specification for +// Condor resources. +type StorageDatabasecenterProtoCommonProduct struct { + // Engine: The specific engine that the underlying database is running. + // + // Possible values: + // "ENGINE_UNSPECIFIED" - UNSPECIFIED means engine type is not known + // or available. + // "MYSQL" - MySQL binary running as engine in database instance. + // "POSTGRES" - Postgres binary running as engine in database + // instance. + // "SQL_SERVER" - SQLServer binary running as engine in database + // instance. + // "NATIVE" - Native database binary running as engine in instance. + // "SPANGRES" - Cloud Spanner with Postgres dialect. + // "ENGINE_OTHER" - Other refers to rest of other database engine. + // This is to be when engine is known, but it is not present in this + // enum. + Engine string `json:"engine,omitempty"` + + // Type: Type of specific database product. It could be CloudSQL, + // AlloyDB etc.. + // + // Possible values: + // "PRODUCT_TYPE_UNSPECIFIED" - UNSPECIFIED means product type is not + // known or available. + // "CLOUD_SQL" - Cloud SQL product area in GCP + // "ALLOYDB" - AlloyDB product area in GCP + // "SPANNER" - Spanner product area in GCP + // "ON_PREM" - On premises database product. + // "PRODUCT_TYPE_OTHER" - Other refers to rest of other product type. + // This is to be when product type is known, but it is not present in + // this enum. + Type string `json:"type,omitempty"` + + // Version: Version of the underlying database engine. Example values: + // For MySQL, it could be "8.0", "5.7" etc.. For Postgres, it could be + // "14", "15" etc.. + Version string `json:"version,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Engine") 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. "Engine") 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 *StorageDatabasecenterProtoCommonProduct) MarshalJSON() ([]byte, error) { + type NoMethod StorageDatabasecenterProtoCommonProduct + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// StringRestrictions: Restrictions on STRING type values +type StringRestrictions struct { + // AllowedValues: The list of allowed values, if bounded. This field + // will be empty if there is a unbounded number of allowed values. + AllowedValues []string `json:"allowedValues,omitempty"` + + // ForceSendFields is a list of field names (e.g. "AllowedValues") 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. "AllowedValues") 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 *StringRestrictions) MarshalJSON() ([]byte, error) { + type NoMethod StringRestrictions + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// SupportedDatabaseFlag: SupportedDatabaseFlag gives general +// information about a database flag, like type and allowed values. This +// is a static value that is defined on the server side, and it cannot +// be modified by callers. To set the Database flags on a particular +// Instance, a caller should modify the Instance.database_flags field. +type SupportedDatabaseFlag struct { + // AcceptsMultipleValues: Whether the database flag accepts multiple + // values. If true, a comma-separated list of stringified values may be + // specified. + AcceptsMultipleValues bool `json:"acceptsMultipleValues,omitempty"` + + // FlagName: The name of the database flag, e.g. "max_allowed_packets". + // The is a possibly key for the Instance.database_flags map field. + FlagName string `json:"flagName,omitempty"` + + // IntegerRestrictions: Restriction on INTEGER type value. + IntegerRestrictions *IntegerRestrictions `json:"integerRestrictions,omitempty"` + + // Name: The name of the flag resource, following Google Cloud + // conventions, e.g.: * + // projects/{project}/locations/{location}/flags/{flag} This field + // currently has no semantic meaning. + Name string `json:"name,omitempty"` + + // RequiresDbRestart: Whether setting or updating this flag on an + // Instance requires a database restart. If a flag that requires + // database restart is set, the backend will automatically restart the + // database (making sure to satisfy any availability SLO's). + RequiresDbRestart bool `json:"requiresDbRestart,omitempty"` + + // StringRestrictions: Restriction on STRING type value. + StringRestrictions *StringRestrictions `json:"stringRestrictions,omitempty"` + + // SupportedDbVersions: Major database engine versions for which this + // flag is supported. + // + // Possible values: + // "DATABASE_VERSION_UNSPECIFIED" - This is an unknown database + // version. + // "POSTGRES_13" - DEPRECATED - The database version is Postgres 13. + // "POSTGRES_14" - The database version is Postgres 14. + // "POSTGRES_15" - The database version is Postgres 15. + SupportedDbVersions []string `json:"supportedDbVersions,omitempty"` + + // Possible values: + // "VALUE_TYPE_UNSPECIFIED" - This is an unknown flag type. + // "STRING" - String type flag. + // "INTEGER" - Integer type flag. + // "FLOAT" - Float type flag. + // "NONE" - Denotes that the flag does not accept any values. + ValueType string `json:"valueType,omitempty"` + + // ForceSendFields is a list of field names (e.g. + // "AcceptsMultipleValues") 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. "AcceptsMultipleValues") 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 *SupportedDatabaseFlag) MarshalJSON() ([]byte, error) { + type NoMethod SupportedDatabaseFlag + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// TimeBasedRetention: A time based retention policy specifies that all +// backups within a certain time period should be retained. +type TimeBasedRetention struct { + // RetentionPeriod: The retention period. + RetentionPeriod string `json:"retentionPeriod,omitempty"` + + // ForceSendFields is a list of field names (e.g. "RetentionPeriod") 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. "RetentionPeriod") 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 *TimeBasedRetention) MarshalJSON() ([]byte, error) { + type NoMethod TimeBasedRetention + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// UpdatePolicy: Policy to be used while updating the instance. +type UpdatePolicy struct { + // Mode: Mode for updating the instance. + // + // Possible values: + // "MODE_UNSPECIFIED" - Mode is unknown. + // "DEFAULT" - Least disruptive way to apply the update. + // "FORCE_APPLY" - Performs a forced update when applicable. This will + // be fast but may incur a downtime. + Mode string `json:"mode,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Mode") 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. "Mode") 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 *UpdatePolicy) MarshalJSON() ([]byte, error) { + type NoMethod UpdatePolicy + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// User: Message describing User object. +type User struct { + // DatabaseRoles: Optional. List of database roles this user has. The + // database role strings are subject to the PostgreSQL naming + // conventions. + DatabaseRoles []string `json:"databaseRoles,omitempty"` + + // Name: Output only. Name of the resource in the form of + // projects/{project}/locations/{location}/cluster/{cluster}/users/{user} + // . + Name string `json:"name,omitempty"` + + // Password: Input only. Password for the user. + Password string `json:"password,omitempty"` + + // UserType: Optional. Type of this user. + // + // Possible values: + // "USER_TYPE_UNSPECIFIED" - Unspecified user type. + // "ALLOYDB_BUILT_IN" - The default user type that authenticates via + // password-based authentication. + // "ALLOYDB_IAM_USER" - Database user that can authenticate via + // IAM-Based authentication. + UserType string `json:"userType,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 *User) MarshalJSON() ([]byte, error) { + type NoMethod User + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// UserPassword: The username/password for a database user. Used for +// specifying initial users at cluster creation time. +type UserPassword struct { + // Password: The initial password for the user. + Password string `json:"password,omitempty"` + + // User: The database username. + User string `json:"user,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Password") 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. "Password") 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 *UserPassword) MarshalJSON() ([]byte, error) { + type NoMethod UserPassword + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// WeeklySchedule: A weekly schedule starts a backup at prescribed start +// times within a day, for the specified days of the week. The weekly +// schedule message is flexible and can be used to create many types of +// schedules. For example, to have a daily backup that starts at 22:00, +// configure the `start_times` field to have one element "22:00" and the +// `days_of_week` field to have all seven days of the week. +type WeeklySchedule struct { + // DaysOfWeek: The days of the week to perform a backup. If this field + // is left empty, the default of every day of the week is used. + // + // Possible values: + // "DAY_OF_WEEK_UNSPECIFIED" - The day of the week is unspecified. + // "MONDAY" - Monday + // "TUESDAY" - Tuesday + // "WEDNESDAY" - Wednesday + // "THURSDAY" - Thursday + // "FRIDAY" - Friday + // "SATURDAY" - Saturday + // "SUNDAY" - Sunday + DaysOfWeek []string `json:"daysOfWeek,omitempty"` + + // StartTimes: The times during the day to start a backup. The start + // times are assumed to be in UTC and to be an exact hour (e.g., + // 04:00:00). If no start times are provided, a single fixed start time + // is chosen arbitrarily. + StartTimes []*GoogleTypeTimeOfDay `json:"startTimes,omitempty"` + + // ForceSendFields is a list of field names (e.g. "DaysOfWeek") 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. "DaysOfWeek") 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 *WeeklySchedule) MarshalJSON() ([]byte, error) { + type NoMethod WeeklySchedule + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// method id "alloydb.projects.locations.get": + +type ProjectsLocationsGetCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// Get: Gets information about a location. +// +// - name: Resource name for the location. +func (r *ProjectsLocationsService) Get(name string) *ProjectsLocationsGetCall { + c := &ProjectsLocationsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *ProjectsLocationsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsGetCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// IfNoneMatch sets the optional parameter which makes the operation +// fail if the object's ETag matches the given value. This is useful for +// getting updates only after the object has changed since the last +// request. Use googleapi.IsNotModified to check whether the response +// error from Do is the result of In-None-Match. +func (c *ProjectsLocationsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsGetCall { + c.ifNoneMatch_ = entityTag + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *ProjectsLocationsGetCall) Context(ctx context.Context) *ProjectsLocationsGetCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *ProjectsLocationsGetCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsGetCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) + } + var body io.Reader = nil + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/{+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 "alloydb.projects.locations.get" call. +// Exactly one of *GoogleCloudLocationLocation or error will be non-nil. +// Any non-2xx status code is an error. Response headers are in either +// *GoogleCloudLocationLocation.ServerResponse.Header or (if a response +// was returned at all) in error.(*googleapi.Error).Header. Use +// googleapi.IsNotModified to check whether the returned error was +// because http.StatusNotModified was returned. +func (c *ProjectsLocationsGetCall) Do(opts ...googleapi.CallOption) (*GoogleCloudLocationLocation, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, gensupport.WrapError(&googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + }) + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, gensupport.WrapError(err) + } + ret := &GoogleCloudLocationLocation{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Gets information about a location.", + // "flatPath": "v1beta/projects/{projectsId}/locations/{locationsId}", + // "httpMethod": "GET", + // "id": "alloydb.projects.locations.get", + // "parameterOrder": [ + // "name" + // ], + // "parameters": { + // "name": { + // "description": "Resource name for the location.", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1beta/{+name}", + // "response": { + // "$ref": "GoogleCloudLocationLocation" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "alloydb.projects.locations.list": + +type ProjectsLocationsListCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// List: Lists information about the supported locations for this +// service. +// +// - name: The resource that owns the locations collection, if +// applicable. +func (r *ProjectsLocationsService) List(name string) *ProjectsLocationsListCall { + c := &ProjectsLocationsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + return c +} + +// Filter sets the optional parameter "filter": A filter to narrow down +// results to a preferred subset. The filtering language accepts strings +// like "displayName=tokyo", and is documented in more detail in +// AIP-160 (https://google.aip.dev/160). +func (c *ProjectsLocationsListCall) Filter(filter string) *ProjectsLocationsListCall { + c.urlParams_.Set("filter", filter) + return c +} + +// PageSize sets the optional parameter "pageSize": The maximum number +// of results to return. If not set, the service selects a default. +func (c *ProjectsLocationsListCall) PageSize(pageSize int64) *ProjectsLocationsListCall { + c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) + return c +} + +// PageToken sets the optional parameter "pageToken": A page token +// received from the `next_page_token` field in the response. Send that +// page token to receive the subsequent page. +func (c *ProjectsLocationsListCall) PageToken(pageToken string) *ProjectsLocationsListCall { + c.urlParams_.Set("pageToken", pageToken) + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *ProjectsLocationsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsListCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// IfNoneMatch sets the optional parameter which makes the operation +// fail if the object's ETag matches the given value. This is useful for +// getting updates only after the object has changed since the last +// request. Use googleapi.IsNotModified to check whether the response +// error from Do is the result of In-None-Match. +func (c *ProjectsLocationsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsListCall { + c.ifNoneMatch_ = entityTag + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *ProjectsLocationsListCall) Context(ctx context.Context) *ProjectsLocationsListCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *ProjectsLocationsListCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsListCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) + } + var body io.Reader = nil + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/{+name}/locations") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("GET", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "name": c.name, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "alloydb.projects.locations.list" call. +// Exactly one of *GoogleCloudLocationListLocationsResponse or error +// will be non-nil. Any non-2xx status code is an error. Response +// headers are in either +// *GoogleCloudLocationListLocationsResponse.ServerResponse.Header or +// (if a response was returned at all) in +// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check +// whether the returned error was because http.StatusNotModified was +// returned. +func (c *ProjectsLocationsListCall) Do(opts ...googleapi.CallOption) (*GoogleCloudLocationListLocationsResponse, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, gensupport.WrapError(&googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + }) + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, gensupport.WrapError(err) + } + ret := &GoogleCloudLocationListLocationsResponse{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Lists information about the supported locations for this service.", + // "flatPath": "v1beta/projects/{projectsId}/locations", + // "httpMethod": "GET", + // "id": "alloydb.projects.locations.list", + // "parameterOrder": [ + // "name" + // ], + // "parameters": { + // "filter": { + // "description": "A filter to narrow down results to a preferred subset. The filtering language accepts strings like `\"displayName=tokyo\"`, and is documented in more detail in [AIP-160](https://google.aip.dev/160).", + // "location": "query", + // "type": "string" + // }, + // "name": { + // "description": "The resource that owns the locations collection, if applicable.", + // "location": "path", + // "pattern": "^projects/[^/]+$", + // "required": true, + // "type": "string" + // }, + // "pageSize": { + // "description": "The maximum number of results to return. If not set, the service selects a default.", + // "format": "int32", + // "location": "query", + // "type": "integer" + // }, + // "pageToken": { + // "description": "A page token received from the `next_page_token` field in the response. Send that page token to receive the subsequent page.", + // "location": "query", + // "type": "string" + // } + // }, + // "path": "v1beta/{+name}/locations", + // "response": { + // "$ref": "GoogleCloudLocationListLocationsResponse" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// Pages invokes f for each page of results. +// A non-nil error returned from f will halt the iteration. +// The provided context supersedes any context provided to the Context method. +func (c *ProjectsLocationsListCall) Pages(ctx context.Context, f func(*GoogleCloudLocationListLocationsResponse) 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 "alloydb.projects.locations.backups.create": + +type ProjectsLocationsBackupsCreateCall struct { + s *Service + parent string + backup *Backup + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Create: Creates a new Backup in a given project and location. +// +// - parent: Value for parent. +func (r *ProjectsLocationsBackupsService) Create(parent string, backup *Backup) *ProjectsLocationsBackupsCreateCall { + c := &ProjectsLocationsBackupsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + c.backup = backup + return c +} + +// BackupId sets the optional parameter "backupId": Required. ID of the +// requesting object. +func (c *ProjectsLocationsBackupsCreateCall) BackupId(backupId string) *ProjectsLocationsBackupsCreateCall { + c.urlParams_.Set("backupId", backupId) + return c +} + +// RequestId sets the optional parameter "requestId": An optional +// request ID to identify requests. Specify a unique request ID so that +// if you must retry your request, the server will know to ignore the +// request if it has already been completed. The server will guarantee +// that for at least 60 minutes since the first request. For example, +// consider a situation where you make an initial request and the +// request times out. If you make the request again with the same +// request ID, the server can check if original operation with the same +// request ID was received, and if so, will ignore the second request. +// This prevents clients from accidentally creating duplicate +// commitments. The request ID must be a valid UUID with the exception +// that zero UUID is not supported +// (00000000-0000-0000-0000-000000000000). +func (c *ProjectsLocationsBackupsCreateCall) RequestId(requestId string) *ProjectsLocationsBackupsCreateCall { + c.urlParams_.Set("requestId", requestId) + return c +} + +// ValidateOnly sets the optional parameter "validateOnly": If set, the +// backend validates the request, but doesn't actually execute it. +func (c *ProjectsLocationsBackupsCreateCall) ValidateOnly(validateOnly bool) *ProjectsLocationsBackupsCreateCall { + 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 *ProjectsLocationsBackupsCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsBackupsCreateCall { + 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 *ProjectsLocationsBackupsCreateCall) Context(ctx context.Context) *ProjectsLocationsBackupsCreateCall { + 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 *ProjectsLocationsBackupsCreateCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsBackupsCreateCall) 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.backup) + 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, "v1beta/{+parent}/backups") + 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 "alloydb.projects.locations.backups.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 *ProjectsLocationsBackupsCreateCall) Do(opts ...googleapi.CallOption) (*Operation, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, gensupport.WrapError(&googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + }) + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, gensupport.WrapError(err) + } + ret := &Operation{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Creates a new Backup in a given project and location.", + // "flatPath": "v1beta/projects/{projectsId}/locations/{locationsId}/backups", + // "httpMethod": "POST", + // "id": "alloydb.projects.locations.backups.create", + // "parameterOrder": [ + // "parent" + // ], + // "parameters": { + // "backupId": { + // "description": "Required. ID of the requesting object.", + // "location": "query", + // "type": "string" + // }, + // "parent": { + // "description": "Required. Value for parent.", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+$", + // "required": true, + // "type": "string" + // }, + // "requestId": { + // "description": "Optional. An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. The server will guarantee that for at least 60 minutes since the first request. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", + // "location": "query", + // "type": "string" + // }, + // "validateOnly": { + // "description": "Optional. If set, the backend validates the request, but doesn't actually execute it.", + // "location": "query", + // "type": "boolean" + // } + // }, + // "path": "v1beta/{+parent}/backups", + // "request": { + // "$ref": "Backup" + // }, + // "response": { + // "$ref": "Operation" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "alloydb.projects.locations.backups.delete": + +type ProjectsLocationsBackupsDeleteCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Delete: Deletes a single Backup. +// +// - name: Name of the resource. For the required format, see the +// comment on the Backup.name field. +func (r *ProjectsLocationsBackupsService) Delete(name string) *ProjectsLocationsBackupsDeleteCall { + c := &ProjectsLocationsBackupsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + return c +} + +// Etag sets the optional parameter "etag": The current etag of the +// Backup. If an etag is provided and does not match the current etag of +// the Backup, deletion will be blocked and an ABORTED error will be +// returned. +func (c *ProjectsLocationsBackupsDeleteCall) Etag(etag string) *ProjectsLocationsBackupsDeleteCall { + c.urlParams_.Set("etag", etag) + return c +} + +// RequestId sets the optional parameter "requestId": An optional +// request ID to identify requests. Specify a unique request ID so that +// if you must retry your request, the server will know to ignore the +// request if it has already been completed. The server will guarantee +// that for at least 60 minutes after the first request. For example, +// consider a situation where you make an initial request and the +// request times out. If you make the request again with the same +// request ID, the server can check if original operation with the same +// request ID was received, and if so, will ignore the second request. +// This prevents clients from accidentally creating duplicate +// commitments. The request ID must be a valid UUID with the exception +// that zero UUID is not supported +// (00000000-0000-0000-0000-000000000000). +func (c *ProjectsLocationsBackupsDeleteCall) RequestId(requestId string) *ProjectsLocationsBackupsDeleteCall { + c.urlParams_.Set("requestId", requestId) + return c +} + +// ValidateOnly sets the optional parameter "validateOnly": If set, the +// backend validates the request, but doesn't actually execute it. +func (c *ProjectsLocationsBackupsDeleteCall) ValidateOnly(validateOnly bool) *ProjectsLocationsBackupsDeleteCall { + 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 *ProjectsLocationsBackupsDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsBackupsDeleteCall { + 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 *ProjectsLocationsBackupsDeleteCall) Context(ctx context.Context) *ProjectsLocationsBackupsDeleteCall { + 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 *ProjectsLocationsBackupsDeleteCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsBackupsDeleteCall) 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, "v1beta/{+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 "alloydb.projects.locations.backups.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 *ProjectsLocationsBackupsDeleteCall) Do(opts ...googleapi.CallOption) (*Operation, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, gensupport.WrapError(&googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + }) + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, gensupport.WrapError(err) + } + ret := &Operation{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Deletes a single Backup.", + // "flatPath": "v1beta/projects/{projectsId}/locations/{locationsId}/backups/{backupsId}", + // "httpMethod": "DELETE", + // "id": "alloydb.projects.locations.backups.delete", + // "parameterOrder": [ + // "name" + // ], + // "parameters": { + // "etag": { + // "description": "Optional. The current etag of the Backup. If an etag is provided and does not match the current etag of the Backup, deletion will be blocked and an ABORTED error will be returned.", + // "location": "query", + // "type": "string" + // }, + // "name": { + // "description": "Required. Name of the resource. For the required format, see the comment on the Backup.name field.", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+/backups/[^/]+$", + // "required": true, + // "type": "string" + // }, + // "requestId": { + // "description": "Optional. An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. The server will guarantee that for at least 60 minutes after the first request. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", + // "location": "query", + // "type": "string" + // }, + // "validateOnly": { + // "description": "Optional. If set, the backend validates the request, but doesn't actually execute it.", + // "location": "query", + // "type": "boolean" + // } + // }, + // "path": "v1beta/{+name}", + // "response": { + // "$ref": "Operation" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "alloydb.projects.locations.backups.get": + +type ProjectsLocationsBackupsGetCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// Get: Gets details of a single Backup. +// +// - name: Name of the resource. +func (r *ProjectsLocationsBackupsService) Get(name string) *ProjectsLocationsBackupsGetCall { + c := &ProjectsLocationsBackupsGetCall{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 *ProjectsLocationsBackupsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsBackupsGetCall { + 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 *ProjectsLocationsBackupsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsBackupsGetCall { + 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 *ProjectsLocationsBackupsGetCall) Context(ctx context.Context) *ProjectsLocationsBackupsGetCall { + 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 *ProjectsLocationsBackupsGetCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsBackupsGetCall) 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, "v1beta/{+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 "alloydb.projects.locations.backups.get" call. +// Exactly one of *Backup or error will be non-nil. Any non-2xx status +// code is an error. Response headers are in either +// *Backup.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 *ProjectsLocationsBackupsGetCall) Do(opts ...googleapi.CallOption) (*Backup, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, gensupport.WrapError(&googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + }) + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, gensupport.WrapError(err) + } + ret := &Backup{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Gets details of a single Backup.", + // "flatPath": "v1beta/projects/{projectsId}/locations/{locationsId}/backups/{backupsId}", + // "httpMethod": "GET", + // "id": "alloydb.projects.locations.backups.get", + // "parameterOrder": [ + // "name" + // ], + // "parameters": { + // "name": { + // "description": "Required. Name of the resource", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+/backups/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1beta/{+name}", + // "response": { + // "$ref": "Backup" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "alloydb.projects.locations.backups.list": + +type ProjectsLocationsBackupsListCall struct { + s *Service + parent string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// List: Lists Backups in a given project and location. +// +// - parent: Parent value for ListBackupsRequest. +func (r *ProjectsLocationsBackupsService) List(parent string) *ProjectsLocationsBackupsListCall { + c := &ProjectsLocationsBackupsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + return c +} + +// Filter sets the optional parameter "filter": Filtering results +func (c *ProjectsLocationsBackupsListCall) Filter(filter string) *ProjectsLocationsBackupsListCall { + c.urlParams_.Set("filter", filter) + return c +} + +// OrderBy sets the optional parameter "orderBy": Hint for how to order +// the results +func (c *ProjectsLocationsBackupsListCall) OrderBy(orderBy string) *ProjectsLocationsBackupsListCall { + c.urlParams_.Set("orderBy", orderBy) + return c +} + +// PageSize sets the optional parameter "pageSize": Requested page size. +// Server may return fewer items than requested. If unspecified, server +// will pick an appropriate default. +func (c *ProjectsLocationsBackupsListCall) PageSize(pageSize int64) *ProjectsLocationsBackupsListCall { + c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) + return c +} + +// PageToken sets the optional parameter "pageToken": A token +// identifying a page of results the server should return. +func (c *ProjectsLocationsBackupsListCall) PageToken(pageToken string) *ProjectsLocationsBackupsListCall { + 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 *ProjectsLocationsBackupsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsBackupsListCall { + 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 *ProjectsLocationsBackupsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsBackupsListCall { + 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 *ProjectsLocationsBackupsListCall) Context(ctx context.Context) *ProjectsLocationsBackupsListCall { + 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 *ProjectsLocationsBackupsListCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsBackupsListCall) 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, "v1beta/{+parent}/backups") + 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 "alloydb.projects.locations.backups.list" call. +// Exactly one of *ListBackupsResponse or error will be non-nil. Any +// non-2xx status code is an error. Response headers are in either +// *ListBackupsResponse.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 *ProjectsLocationsBackupsListCall) Do(opts ...googleapi.CallOption) (*ListBackupsResponse, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, gensupport.WrapError(&googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + }) + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, gensupport.WrapError(err) + } + ret := &ListBackupsResponse{ + 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 Backups in a given project and location.", + // "flatPath": "v1beta/projects/{projectsId}/locations/{locationsId}/backups", + // "httpMethod": "GET", + // "id": "alloydb.projects.locations.backups.list", + // "parameterOrder": [ + // "parent" + // ], + // "parameters": { + // "filter": { + // "description": "Filtering results", + // "location": "query", + // "type": "string" + // }, + // "orderBy": { + // "description": "Hint for how to order the results", + // "location": "query", + // "type": "string" + // }, + // "pageSize": { + // "description": "Requested page size. Server may return fewer items than requested. If unspecified, server will pick an appropriate default.", + // "format": "int32", + // "location": "query", + // "type": "integer" + // }, + // "pageToken": { + // "description": "A token identifying a page of results the server should return.", + // "location": "query", + // "type": "string" + // }, + // "parent": { + // "description": "Required. Parent value for ListBackupsRequest", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1beta/{+parent}/backups", + // "response": { + // "$ref": "ListBackupsResponse" + // }, + // "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 *ProjectsLocationsBackupsListCall) Pages(ctx context.Context, f func(*ListBackupsResponse) 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 "alloydb.projects.locations.backups.patch": + +type ProjectsLocationsBackupsPatchCall struct { + s *Service + name string + backup *Backup + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Patch: Updates the parameters of a single Backup. +// +// - name: Output only. The name of the backup resource with the format: +// - projects/{project}/locations/{region}/backups/{backup_id} where +// the cluster and backup ID segments should satisfy the regex +// expression `[a-z]([a-z0-9-]{0,61}[a-z0-9])?`, e.g. 1-63 characters +// of lowercase letters, numbers, and dashes, starting with a letter, +// and ending with a letter or number. For more details see +// https://google.aip.dev/122. The prefix of the backup resource name +// is the name of the parent resource: * +// projects/{project}/locations/{region}. +func (r *ProjectsLocationsBackupsService) Patch(name string, backup *Backup) *ProjectsLocationsBackupsPatchCall { + c := &ProjectsLocationsBackupsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + c.backup = backup + return c +} + +// AllowMissing sets the optional parameter "allowMissing": If set to +// true, update succeeds even if instance is not found. In that case, a +// new backup is created and `update_mask` is ignored. +func (c *ProjectsLocationsBackupsPatchCall) AllowMissing(allowMissing bool) *ProjectsLocationsBackupsPatchCall { + c.urlParams_.Set("allowMissing", fmt.Sprint(allowMissing)) + return c +} + +// RequestId sets the optional parameter "requestId": An optional +// request ID to identify requests. Specify a unique request ID so that +// if you must retry your request, the server will know to ignore the +// request if it has already been completed. The server will guarantee +// that for at least 60 minutes since the first request. For example, +// consider a situation where you make an initial request and the +// request times out. If you make the request again with the same +// request ID, the server can check if original operation with the same +// request ID was received, and if so, will ignore the second request. +// This prevents clients from accidentally creating duplicate +// commitments. The request ID must be a valid UUID with the exception +// that zero UUID is not supported +// (00000000-0000-0000-0000-000000000000). +func (c *ProjectsLocationsBackupsPatchCall) RequestId(requestId string) *ProjectsLocationsBackupsPatchCall { + c.urlParams_.Set("requestId", requestId) + return c +} + +// UpdateMask sets the optional parameter "updateMask": Field mask is +// used to specify the fields to be overwritten in the Backup resource +// by the update. The fields specified in the update_mask are relative +// to the resource, not the full request. A field will be overwritten if +// it is in the mask. If the user does not provide a mask then all +// fields will be overwritten. +func (c *ProjectsLocationsBackupsPatchCall) UpdateMask(updateMask string) *ProjectsLocationsBackupsPatchCall { + c.urlParams_.Set("updateMask", updateMask) + return c +} + +// ValidateOnly sets the optional parameter "validateOnly": If set, the +// backend validates the request, but doesn't actually execute it. +func (c *ProjectsLocationsBackupsPatchCall) ValidateOnly(validateOnly bool) *ProjectsLocationsBackupsPatchCall { + 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 *ProjectsLocationsBackupsPatchCall) Fields(s ...googleapi.Field) *ProjectsLocationsBackupsPatchCall { + 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 *ProjectsLocationsBackupsPatchCall) Context(ctx context.Context) *ProjectsLocationsBackupsPatchCall { + 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 *ProjectsLocationsBackupsPatchCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsBackupsPatchCall) 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.backup) + 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, "v1beta/{+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 "alloydb.projects.locations.backups.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 *ProjectsLocationsBackupsPatchCall) Do(opts ...googleapi.CallOption) (*Operation, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, gensupport.WrapError(&googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + }) + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, gensupport.WrapError(err) + } + ret := &Operation{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Updates the parameters of a single Backup.", + // "flatPath": "v1beta/projects/{projectsId}/locations/{locationsId}/backups/{backupsId}", + // "httpMethod": "PATCH", + // "id": "alloydb.projects.locations.backups.patch", + // "parameterOrder": [ + // "name" + // ], + // "parameters": { + // "allowMissing": { + // "description": "Optional. If set to true, update succeeds even if instance is not found. In that case, a new backup is created and `update_mask` is ignored.", + // "location": "query", + // "type": "boolean" + // }, + // "name": { + // "description": "Output only. The name of the backup resource with the format: * projects/{project}/locations/{region}/backups/{backup_id} where the cluster and backup ID segments should satisfy the regex expression `[a-z]([a-z0-9-]{0,61}[a-z0-9])?`, e.g. 1-63 characters of lowercase letters, numbers, and dashes, starting with a letter, and ending with a letter or number. For more details see https://google.aip.dev/122. The prefix of the backup resource name is the name of the parent resource: * projects/{project}/locations/{region}", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+/backups/[^/]+$", + // "required": true, + // "type": "string" + // }, + // "requestId": { + // "description": "Optional. An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. The server will guarantee that for at least 60 minutes since the first request. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", + // "location": "query", + // "type": "string" + // }, + // "updateMask": { + // "description": "Optional. Field mask is used to specify the fields to be overwritten in the Backup resource by the update. The fields specified in the update_mask are relative to the resource, not the full request. A field will be overwritten if it is in the mask. If the user does not provide a mask then all fields will be overwritten.", + // "format": "google-fieldmask", + // "location": "query", + // "type": "string" + // }, + // "validateOnly": { + // "description": "Optional. If set, the backend validates the request, but doesn't actually execute it.", + // "location": "query", + // "type": "boolean" + // } + // }, + // "path": "v1beta/{+name}", + // "request": { + // "$ref": "Backup" + // }, + // "response": { + // "$ref": "Operation" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "alloydb.projects.locations.clusters.create": + +type ProjectsLocationsClustersCreateCall struct { + s *Service + parent string + cluster *Cluster + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Create: Creates a new Cluster in a given project and location. +// +// - parent: The location of the new cluster. For the required format, +// see the comment on the Cluster.name field. +func (r *ProjectsLocationsClustersService) Create(parent string, cluster *Cluster) *ProjectsLocationsClustersCreateCall { + c := &ProjectsLocationsClustersCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + c.cluster = cluster + return c +} + +// ClusterId sets the optional parameter "clusterId": Required. ID of +// the requesting object. +func (c *ProjectsLocationsClustersCreateCall) ClusterId(clusterId string) *ProjectsLocationsClustersCreateCall { + c.urlParams_.Set("clusterId", clusterId) + return c +} + +// RequestId sets the optional parameter "requestId": An optional +// request ID to identify requests. Specify a unique request ID so that +// if you must retry your request, the server will know to ignore the +// request if it has already been completed. The server will guarantee +// that for at least 60 minutes since the first request. For example, +// consider a situation where you make an initial request and the +// request times out. If you make the request again with the same +// request ID, the server can check if original operation with the same +// request ID was received, and if so, will ignore the second request. +// This prevents clients from accidentally creating duplicate +// commitments. The request ID must be a valid UUID with the exception +// that zero UUID is not supported +// (00000000-0000-0000-0000-000000000000). +func (c *ProjectsLocationsClustersCreateCall) RequestId(requestId string) *ProjectsLocationsClustersCreateCall { + c.urlParams_.Set("requestId", requestId) + return c +} + +// ValidateOnly sets the optional parameter "validateOnly": If set, +// performs request validation (e.g. permission checks and any other +// type of validation), but do not actually execute the create request. +func (c *ProjectsLocationsClustersCreateCall) ValidateOnly(validateOnly bool) *ProjectsLocationsClustersCreateCall { + 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 *ProjectsLocationsClustersCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsClustersCreateCall { + 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 *ProjectsLocationsClustersCreateCall) Context(ctx context.Context) *ProjectsLocationsClustersCreateCall { + 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 *ProjectsLocationsClustersCreateCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsClustersCreateCall) 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.cluster) + 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, "v1beta/{+parent}/clusters") + 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 "alloydb.projects.locations.clusters.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 *ProjectsLocationsClustersCreateCall) Do(opts ...googleapi.CallOption) (*Operation, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, gensupport.WrapError(&googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + }) + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, gensupport.WrapError(err) + } + ret := &Operation{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Creates a new Cluster in a given project and location.", + // "flatPath": "v1beta/projects/{projectsId}/locations/{locationsId}/clusters", + // "httpMethod": "POST", + // "id": "alloydb.projects.locations.clusters.create", + // "parameterOrder": [ + // "parent" + // ], + // "parameters": { + // "clusterId": { + // "description": "Required. ID of the requesting object.", + // "location": "query", + // "type": "string" + // }, + // "parent": { + // "description": "Required. The location of the new cluster. For the required format, see the comment on the Cluster.name field.", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+$", + // "required": true, + // "type": "string" + // }, + // "requestId": { + // "description": "Optional. An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. The server will guarantee that for at least 60 minutes since the first request. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", + // "location": "query", + // "type": "string" + // }, + // "validateOnly": { + // "description": "Optional. If set, performs request validation (e.g. permission checks and any other type of validation), but do not actually execute the create request.", + // "location": "query", + // "type": "boolean" + // } + // }, + // "path": "v1beta/{+parent}/clusters", + // "request": { + // "$ref": "Cluster" + // }, + // "response": { + // "$ref": "Operation" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "alloydb.projects.locations.clusters.createsecondary": + +type ProjectsLocationsClustersCreatesecondaryCall struct { + s *Service + parent string + cluster *Cluster + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Createsecondary: Creates a cluster of type SECONDARY in the given +// location using the primary cluster as the source. +// +// - parent: The location of the new cluster. For the required format, +// see the comment on the Cluster.name field. +func (r *ProjectsLocationsClustersService) Createsecondary(parent string, cluster *Cluster) *ProjectsLocationsClustersCreatesecondaryCall { + c := &ProjectsLocationsClustersCreatesecondaryCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + c.cluster = cluster + return c +} + +// ClusterId sets the optional parameter "clusterId": Required. ID of +// the requesting object (the secondary cluster). +func (c *ProjectsLocationsClustersCreatesecondaryCall) ClusterId(clusterId string) *ProjectsLocationsClustersCreatesecondaryCall { + c.urlParams_.Set("clusterId", clusterId) + return c +} + +// RequestId sets the optional parameter "requestId": An optional +// request ID to identify requests. Specify a unique request ID so that +// if you must retry your request, the server will know to ignore the +// request if it has already been completed. The server will guarantee +// that for at least 60 minutes since the first request. For example, +// consider a situation where you make an initial request and the +// request times out. If you make the request again with the same +// request ID, the server can check if original operation with the same +// request ID was received, and if so, will ignore the second request. +// This prevents clients from accidentally creating duplicate +// commitments. The request ID must be a valid UUID with the exception +// that zero UUID is not supported +// (00000000-0000-0000-0000-000000000000). +func (c *ProjectsLocationsClustersCreatesecondaryCall) RequestId(requestId string) *ProjectsLocationsClustersCreatesecondaryCall { + c.urlParams_.Set("requestId", requestId) + return c +} + +// ValidateOnly sets the optional parameter "validateOnly": If set, +// performs request validation (e.g. permission checks and any other +// type of validation), but do not actually execute the create request. +func (c *ProjectsLocationsClustersCreatesecondaryCall) ValidateOnly(validateOnly bool) *ProjectsLocationsClustersCreatesecondaryCall { + 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 *ProjectsLocationsClustersCreatesecondaryCall) Fields(s ...googleapi.Field) *ProjectsLocationsClustersCreatesecondaryCall { + 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 *ProjectsLocationsClustersCreatesecondaryCall) Context(ctx context.Context) *ProjectsLocationsClustersCreatesecondaryCall { + 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 *ProjectsLocationsClustersCreatesecondaryCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsClustersCreatesecondaryCall) 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.cluster) + 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, "v1beta/{+parent}/clusters:createsecondary") + 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 "alloydb.projects.locations.clusters.createsecondary" 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 *ProjectsLocationsClustersCreatesecondaryCall) Do(opts ...googleapi.CallOption) (*Operation, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, gensupport.WrapError(&googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + }) + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, gensupport.WrapError(err) + } + ret := &Operation{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Creates a cluster of type SECONDARY in the given location using the primary cluster as the source.", + // "flatPath": "v1beta/projects/{projectsId}/locations/{locationsId}/clusters:createsecondary", + // "httpMethod": "POST", + // "id": "alloydb.projects.locations.clusters.createsecondary", + // "parameterOrder": [ + // "parent" + // ], + // "parameters": { + // "clusterId": { + // "description": "Required. ID of the requesting object (the secondary cluster).", + // "location": "query", + // "type": "string" + // }, + // "parent": { + // "description": "Required. The location of the new cluster. For the required format, see the comment on the Cluster.name field.", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+$", + // "required": true, + // "type": "string" + // }, + // "requestId": { + // "description": "Optional. An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. The server will guarantee that for at least 60 minutes since the first request. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", + // "location": "query", + // "type": "string" + // }, + // "validateOnly": { + // "description": "Optional. If set, performs request validation (e.g. permission checks and any other type of validation), but do not actually execute the create request.", + // "location": "query", + // "type": "boolean" + // } + // }, + // "path": "v1beta/{+parent}/clusters:createsecondary", + // "request": { + // "$ref": "Cluster" + // }, + // "response": { + // "$ref": "Operation" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "alloydb.projects.locations.clusters.delete": + +type ProjectsLocationsClustersDeleteCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Delete: Deletes a single Cluster. +// +// - name: The name of the resource. For the required format, see the +// comment on the Cluster.name field. +func (r *ProjectsLocationsClustersService) Delete(name string) *ProjectsLocationsClustersDeleteCall { + c := &ProjectsLocationsClustersDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + return c +} + +// Etag sets the optional parameter "etag": The current etag of the +// Cluster. If an etag is provided and does not match the current etag +// of the Cluster, deletion will be blocked and an ABORTED error will be +// returned. +func (c *ProjectsLocationsClustersDeleteCall) Etag(etag string) *ProjectsLocationsClustersDeleteCall { + c.urlParams_.Set("etag", etag) + return c +} + +// Force sets the optional parameter "force": Whether to cascade delete +// child instances for given cluster. +func (c *ProjectsLocationsClustersDeleteCall) Force(force bool) *ProjectsLocationsClustersDeleteCall { + c.urlParams_.Set("force", fmt.Sprint(force)) + return c +} + +// RequestId sets the optional parameter "requestId": An optional +// request ID to identify requests. Specify a unique request ID so that +// if you must retry your request, the server will know to ignore the +// request if it has already been completed. The server will guarantee +// that for at least 60 minutes after the first request. For example, +// consider a situation where you make an initial request and the +// request times out. If you make the request again with the same +// request ID, the server can check if original operation with the same +// request ID was received, and if so, will ignore the second request. +// This prevents clients from accidentally creating duplicate +// commitments. The request ID must be a valid UUID with the exception +// that zero UUID is not supported +// (00000000-0000-0000-0000-000000000000). +func (c *ProjectsLocationsClustersDeleteCall) RequestId(requestId string) *ProjectsLocationsClustersDeleteCall { + c.urlParams_.Set("requestId", requestId) + return c +} + +// ValidateOnly sets the optional parameter "validateOnly": If set, +// performs request validation (e.g. permission checks and any other +// type of validation), but do not actually execute the delete. +func (c *ProjectsLocationsClustersDeleteCall) ValidateOnly(validateOnly bool) *ProjectsLocationsClustersDeleteCall { + 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 *ProjectsLocationsClustersDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsClustersDeleteCall { + 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 *ProjectsLocationsClustersDeleteCall) Context(ctx context.Context) *ProjectsLocationsClustersDeleteCall { + 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 *ProjectsLocationsClustersDeleteCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsClustersDeleteCall) 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, "v1beta/{+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 "alloydb.projects.locations.clusters.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 *ProjectsLocationsClustersDeleteCall) Do(opts ...googleapi.CallOption) (*Operation, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, gensupport.WrapError(&googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + }) + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, gensupport.WrapError(err) + } + ret := &Operation{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Deletes a single Cluster.", + // "flatPath": "v1beta/projects/{projectsId}/locations/{locationsId}/clusters/{clustersId}", + // "httpMethod": "DELETE", + // "id": "alloydb.projects.locations.clusters.delete", + // "parameterOrder": [ + // "name" + // ], + // "parameters": { + // "etag": { + // "description": "Optional. The current etag of the Cluster. If an etag is provided and does not match the current etag of the Cluster, deletion will be blocked and an ABORTED error will be returned.", + // "location": "query", + // "type": "string" + // }, + // "force": { + // "description": "Optional. Whether to cascade delete child instances for given cluster.", + // "location": "query", + // "type": "boolean" + // }, + // "name": { + // "description": "Required. The name of the resource. For the required format, see the comment on the Cluster.name field.", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+/clusters/[^/]+$", + // "required": true, + // "type": "string" + // }, + // "requestId": { + // "description": "Optional. An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. The server will guarantee that for at least 60 minutes after the first request. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", + // "location": "query", + // "type": "string" + // }, + // "validateOnly": { + // "description": "Optional. If set, performs request validation (e.g. permission checks and any other type of validation), but do not actually execute the delete.", + // "location": "query", + // "type": "boolean" + // } + // }, + // "path": "v1beta/{+name}", + // "response": { + // "$ref": "Operation" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "alloydb.projects.locations.clusters.generateClientCertificate": + +type ProjectsLocationsClustersGenerateClientCertificateCall struct { + s *Service + parent string + generateclientcertificaterequest *GenerateClientCertificateRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// GenerateClientCertificate: Generate a client certificate signed by a +// Cluster CA. The sole purpose of this endpoint is to support AlloyDB +// connectors and the Auth Proxy client. The endpoint's behavior is +// subject to change without notice, so do not rely on its behavior +// remaining constant. Future changes will not break AlloyDB connectors +// or the Auth Proxy client. +// +// - parent: The name of the parent resource. The required format is: * +// projects/{project}/locations/{location}/clusters/{cluster}. +func (r *ProjectsLocationsClustersService) GenerateClientCertificate(parent string, generateclientcertificaterequest *GenerateClientCertificateRequest) *ProjectsLocationsClustersGenerateClientCertificateCall { + c := &ProjectsLocationsClustersGenerateClientCertificateCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + c.generateclientcertificaterequest = generateclientcertificaterequest + 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 *ProjectsLocationsClustersGenerateClientCertificateCall) Fields(s ...googleapi.Field) *ProjectsLocationsClustersGenerateClientCertificateCall { + 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 *ProjectsLocationsClustersGenerateClientCertificateCall) Context(ctx context.Context) *ProjectsLocationsClustersGenerateClientCertificateCall { + 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 *ProjectsLocationsClustersGenerateClientCertificateCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsClustersGenerateClientCertificateCall) 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.generateclientcertificaterequest) + 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, "v1beta/{+parent}:generateClientCertificate") + 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 "alloydb.projects.locations.clusters.generateClientCertificate" call. +// Exactly one of *GenerateClientCertificateResponse or error will be +// non-nil. Any non-2xx status code is an error. Response headers are in +// either *GenerateClientCertificateResponse.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 *ProjectsLocationsClustersGenerateClientCertificateCall) Do(opts ...googleapi.CallOption) (*GenerateClientCertificateResponse, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, gensupport.WrapError(&googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + }) + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, gensupport.WrapError(err) + } + ret := &GenerateClientCertificateResponse{ + 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": "Generate a client certificate signed by a Cluster CA. The sole purpose of this endpoint is to support AlloyDB connectors and the Auth Proxy client. The endpoint's behavior is subject to change without notice, so do not rely on its behavior remaining constant. Future changes will not break AlloyDB connectors or the Auth Proxy client.", + // "flatPath": "v1beta/projects/{projectsId}/locations/{locationsId}/clusters/{clustersId}:generateClientCertificate", + // "httpMethod": "POST", + // "id": "alloydb.projects.locations.clusters.generateClientCertificate", + // "parameterOrder": [ + // "parent" + // ], + // "parameters": { + // "parent": { + // "description": "Required. The name of the parent resource. The required format is: * projects/{project}/locations/{location}/clusters/{cluster}", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+/clusters/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1beta/{+parent}:generateClientCertificate", + // "request": { + // "$ref": "GenerateClientCertificateRequest" + // }, + // "response": { + // "$ref": "GenerateClientCertificateResponse" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "alloydb.projects.locations.clusters.get": + +type ProjectsLocationsClustersGetCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// Get: Gets details of a single Cluster. +// +// - name: The name of the resource. For the required format, see the +// comment on the Cluster.name field. +func (r *ProjectsLocationsClustersService) Get(name string) *ProjectsLocationsClustersGetCall { + c := &ProjectsLocationsClustersGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + return c +} + +// View sets the optional parameter "view": The view of the cluster to +// return. Returns all default fields if not set. +// +// Possible values: +// +// "CLUSTER_VIEW_UNSPECIFIED" - CLUSTER_VIEW_UNSPECIFIED Not +// +// specified, equivalent to BASIC. +// +// "CLUSTER_VIEW_BASIC" - BASIC server responses include all the +// +// relevant cluster details, excluding +// Cluster.ContinuousBackupInfo.EarliestRestorableTime and other +// view-specific fields. The default value. +// +// "CLUSTER_VIEW_CONTINUOUS_BACKUP" - CONTINUOUS_BACKUP response +// +// returns all the fields from BASIC plus the earliest restorable time +// if continuous backups are enabled. May increase latency. +func (c *ProjectsLocationsClustersGetCall) View(view string) *ProjectsLocationsClustersGetCall { + 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 *ProjectsLocationsClustersGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsClustersGetCall { + 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 *ProjectsLocationsClustersGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsClustersGetCall { + 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 *ProjectsLocationsClustersGetCall) Context(ctx context.Context) *ProjectsLocationsClustersGetCall { + 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 *ProjectsLocationsClustersGetCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsClustersGetCall) 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, "v1beta/{+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 "alloydb.projects.locations.clusters.get" call. +// Exactly one of *Cluster or error will be non-nil. Any non-2xx status +// code is an error. Response headers are in either +// *Cluster.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 *ProjectsLocationsClustersGetCall) Do(opts ...googleapi.CallOption) (*Cluster, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, gensupport.WrapError(&googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + }) + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, gensupport.WrapError(err) + } + ret := &Cluster{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Gets details of a single Cluster.", + // "flatPath": "v1beta/projects/{projectsId}/locations/{locationsId}/clusters/{clustersId}", + // "httpMethod": "GET", + // "id": "alloydb.projects.locations.clusters.get", + // "parameterOrder": [ + // "name" + // ], + // "parameters": { + // "name": { + // "description": "Required. The name of the resource. For the required format, see the comment on the Cluster.name field.", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+/clusters/[^/]+$", + // "required": true, + // "type": "string" + // }, + // "view": { + // "description": "Optional. The view of the cluster to return. Returns all default fields if not set.", + // "enum": [ + // "CLUSTER_VIEW_UNSPECIFIED", + // "CLUSTER_VIEW_BASIC", + // "CLUSTER_VIEW_CONTINUOUS_BACKUP" + // ], + // "enumDescriptions": [ + // "CLUSTER_VIEW_UNSPECIFIED Not specified, equivalent to BASIC.", + // "BASIC server responses include all the relevant cluster details, excluding Cluster.ContinuousBackupInfo.EarliestRestorableTime and other view-specific fields. The default value.", + // "CONTINUOUS_BACKUP response returns all the fields from BASIC plus the earliest restorable time if continuous backups are enabled. May increase latency." + // ], + // "location": "query", + // "type": "string" + // } + // }, + // "path": "v1beta/{+name}", + // "response": { + // "$ref": "Cluster" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "alloydb.projects.locations.clusters.list": + +type ProjectsLocationsClustersListCall struct { + s *Service + parent string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// List: Lists Clusters in a given project and location. +// +// - parent: The name of the parent resource. For the required format, +// see the comment on the Cluster.name field. Additionally, you can +// perform an aggregated list operation by specifying a value with the +// following format: * projects/{project}/locations/-. +func (r *ProjectsLocationsClustersService) List(parent string) *ProjectsLocationsClustersListCall { + c := &ProjectsLocationsClustersListCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + return c +} + +// Filter sets the optional parameter "filter": Filtering results +func (c *ProjectsLocationsClustersListCall) Filter(filter string) *ProjectsLocationsClustersListCall { + c.urlParams_.Set("filter", filter) + return c +} + +// OrderBy sets the optional parameter "orderBy": Hint for how to order +// the results +func (c *ProjectsLocationsClustersListCall) OrderBy(orderBy string) *ProjectsLocationsClustersListCall { + c.urlParams_.Set("orderBy", orderBy) + return c +} + +// PageSize sets the optional parameter "pageSize": Requested page size. +// Server may return fewer items than requested. If unspecified, server +// will pick an appropriate default. +func (c *ProjectsLocationsClustersListCall) PageSize(pageSize int64) *ProjectsLocationsClustersListCall { + c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) + return c +} + +// PageToken sets the optional parameter "pageToken": A token +// identifying a page of results the server should return. +func (c *ProjectsLocationsClustersListCall) PageToken(pageToken string) *ProjectsLocationsClustersListCall { + 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 *ProjectsLocationsClustersListCall) Fields(s ...googleapi.Field) *ProjectsLocationsClustersListCall { + 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 *ProjectsLocationsClustersListCall) IfNoneMatch(entityTag string) *ProjectsLocationsClustersListCall { + 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 *ProjectsLocationsClustersListCall) Context(ctx context.Context) *ProjectsLocationsClustersListCall { + 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 *ProjectsLocationsClustersListCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsClustersListCall) 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, "v1beta/{+parent}/clusters") + 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 "alloydb.projects.locations.clusters.list" call. +// Exactly one of *ListClustersResponse or error will be non-nil. Any +// non-2xx status code is an error. Response headers are in either +// *ListClustersResponse.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 *ProjectsLocationsClustersListCall) Do(opts ...googleapi.CallOption) (*ListClustersResponse, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, gensupport.WrapError(&googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + }) + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, gensupport.WrapError(err) + } + ret := &ListClustersResponse{ + 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 Clusters in a given project and location.", + // "flatPath": "v1beta/projects/{projectsId}/locations/{locationsId}/clusters", + // "httpMethod": "GET", + // "id": "alloydb.projects.locations.clusters.list", + // "parameterOrder": [ + // "parent" + // ], + // "parameters": { + // "filter": { + // "description": "Optional. Filtering results", + // "location": "query", + // "type": "string" + // }, + // "orderBy": { + // "description": "Optional. Hint for how to order the results", + // "location": "query", + // "type": "string" + // }, + // "pageSize": { + // "description": "Optional. Requested page size. Server may return fewer items than requested. If unspecified, server will pick an appropriate default.", + // "format": "int32", + // "location": "query", + // "type": "integer" + // }, + // "pageToken": { + // "description": "A token identifying a page of results the server should return.", + // "location": "query", + // "type": "string" + // }, + // "parent": { + // "description": "Required. The name of the parent resource. For the required format, see the comment on the Cluster.name field. Additionally, you can perform an aggregated list operation by specifying a value with the following format: * projects/{project}/locations/-", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1beta/{+parent}/clusters", + // "response": { + // "$ref": "ListClustersResponse" + // }, + // "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 *ProjectsLocationsClustersListCall) Pages(ctx context.Context, f func(*ListClustersResponse) 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 "alloydb.projects.locations.clusters.patch": + +type ProjectsLocationsClustersPatchCall struct { + s *Service + name string + cluster *Cluster + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Patch: Updates the parameters of a single Cluster. +// +// - name: Output only. The name of the cluster resource with the +// format: * +// projects/{project}/locations/{region}/clusters/{cluster_id} where +// the cluster ID segment should satisfy the regex expression +// `[a-z0-9-]+`. For more details see https://google.aip.dev/122. The +// prefix of the cluster resource name is the name of the parent +// resource: * projects/{project}/locations/{region}. +func (r *ProjectsLocationsClustersService) Patch(name string, cluster *Cluster) *ProjectsLocationsClustersPatchCall { + c := &ProjectsLocationsClustersPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + c.cluster = cluster + return c +} + +// AllowMissing sets the optional parameter "allowMissing": If set to +// true, update succeeds even if cluster is not found. In that case, a +// new cluster is created and `update_mask` is ignored. +func (c *ProjectsLocationsClustersPatchCall) AllowMissing(allowMissing bool) *ProjectsLocationsClustersPatchCall { + c.urlParams_.Set("allowMissing", fmt.Sprint(allowMissing)) + return c +} + +// RequestId sets the optional parameter "requestId": An optional +// request ID to identify requests. Specify a unique request ID so that +// if you must retry your request, the server will know to ignore the +// request if it has already been completed. The server will guarantee +// that for at least 60 minutes since the first request. For example, +// consider a situation where you make an initial request and the +// request times out. If you make the request again with the same +// request ID, the server can check if original operation with the same +// request ID was received, and if so, will ignore the second request. +// This prevents clients from accidentally creating duplicate +// commitments. The request ID must be a valid UUID with the exception +// that zero UUID is not supported +// (00000000-0000-0000-0000-000000000000). +func (c *ProjectsLocationsClustersPatchCall) RequestId(requestId string) *ProjectsLocationsClustersPatchCall { + c.urlParams_.Set("requestId", requestId) + return c +} + +// UpdateMask sets the optional parameter "updateMask": Field mask is +// used to specify the fields to be overwritten in the Cluster resource +// by the update. The fields specified in the update_mask are relative +// to the resource, not the full request. A field will be overwritten if +// it is in the mask. If the user does not provide a mask then all +// fields will be overwritten. +func (c *ProjectsLocationsClustersPatchCall) UpdateMask(updateMask string) *ProjectsLocationsClustersPatchCall { + c.urlParams_.Set("updateMask", updateMask) + return c +} + +// ValidateOnly sets the optional parameter "validateOnly": If set, +// performs request validation (e.g. permission checks and any other +// type of validation), but do not actually execute the update request. +func (c *ProjectsLocationsClustersPatchCall) ValidateOnly(validateOnly bool) *ProjectsLocationsClustersPatchCall { + 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 *ProjectsLocationsClustersPatchCall) Fields(s ...googleapi.Field) *ProjectsLocationsClustersPatchCall { + 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 *ProjectsLocationsClustersPatchCall) Context(ctx context.Context) *ProjectsLocationsClustersPatchCall { + 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 *ProjectsLocationsClustersPatchCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsClustersPatchCall) 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.cluster) + 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, "v1beta/{+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 "alloydb.projects.locations.clusters.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 *ProjectsLocationsClustersPatchCall) Do(opts ...googleapi.CallOption) (*Operation, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, gensupport.WrapError(&googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + }) + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, gensupport.WrapError(err) + } + ret := &Operation{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Updates the parameters of a single Cluster.", + // "flatPath": "v1beta/projects/{projectsId}/locations/{locationsId}/clusters/{clustersId}", + // "httpMethod": "PATCH", + // "id": "alloydb.projects.locations.clusters.patch", + // "parameterOrder": [ + // "name" + // ], + // "parameters": { + // "allowMissing": { + // "description": "Optional. If set to true, update succeeds even if cluster is not found. In that case, a new cluster is created and `update_mask` is ignored.", + // "location": "query", + // "type": "boolean" + // }, + // "name": { + // "description": "Output only. The name of the cluster resource with the format: * projects/{project}/locations/{region}/clusters/{cluster_id} where the cluster ID segment should satisfy the regex expression `[a-z0-9-]+`. For more details see https://google.aip.dev/122. The prefix of the cluster resource name is the name of the parent resource: * projects/{project}/locations/{region}", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+/clusters/[^/]+$", + // "required": true, + // "type": "string" + // }, + // "requestId": { + // "description": "Optional. An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. The server will guarantee that for at least 60 minutes since the first request. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", + // "location": "query", + // "type": "string" + // }, + // "updateMask": { + // "description": "Optional. Field mask is used to specify the fields to be overwritten in the Cluster resource by the update. The fields specified in the update_mask are relative to the resource, not the full request. A field will be overwritten if it is in the mask. If the user does not provide a mask then all fields will be overwritten.", + // "format": "google-fieldmask", + // "location": "query", + // "type": "string" + // }, + // "validateOnly": { + // "description": "Optional. If set, performs request validation (e.g. permission checks and any other type of validation), but do not actually execute the update request.", + // "location": "query", + // "type": "boolean" + // } + // }, + // "path": "v1beta/{+name}", + // "request": { + // "$ref": "Cluster" + // }, + // "response": { + // "$ref": "Operation" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "alloydb.projects.locations.clusters.promote": + +type ProjectsLocationsClustersPromoteCall struct { + s *Service + name string + promoteclusterrequest *PromoteClusterRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Promote: Promotes a SECONDARY cluster. This turns down replication +// from the PRIMARY cluster and promotes a secondary cluster into its +// own standalone cluster. Imperative only. +// +// - name: The name of the resource. For the required format, see the +// comment on the Cluster.name field. +func (r *ProjectsLocationsClustersService) Promote(name string, promoteclusterrequest *PromoteClusterRequest) *ProjectsLocationsClustersPromoteCall { + c := &ProjectsLocationsClustersPromoteCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + c.promoteclusterrequest = promoteclusterrequest + 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 *ProjectsLocationsClustersPromoteCall) Fields(s ...googleapi.Field) *ProjectsLocationsClustersPromoteCall { + 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 *ProjectsLocationsClustersPromoteCall) Context(ctx context.Context) *ProjectsLocationsClustersPromoteCall { + 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 *ProjectsLocationsClustersPromoteCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsClustersPromoteCall) 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.promoteclusterrequest) + 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, "v1beta/{+name}:promote") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("POST", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "name": c.name, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "alloydb.projects.locations.clusters.promote" 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 *ProjectsLocationsClustersPromoteCall) Do(opts ...googleapi.CallOption) (*Operation, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, gensupport.WrapError(&googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + }) + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, gensupport.WrapError(err) + } + ret := &Operation{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Promotes a SECONDARY cluster. This turns down replication from the PRIMARY cluster and promotes a secondary cluster into its own standalone cluster. Imperative only.", + // "flatPath": "v1beta/projects/{projectsId}/locations/{locationsId}/clusters/{clustersId}:promote", + // "httpMethod": "POST", + // "id": "alloydb.projects.locations.clusters.promote", + // "parameterOrder": [ + // "name" + // ], + // "parameters": { + // "name": { + // "description": "Required. The name of the resource. For the required format, see the comment on the Cluster.name field", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+/clusters/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1beta/{+name}:promote", + // "request": { + // "$ref": "PromoteClusterRequest" + // }, + // "response": { + // "$ref": "Operation" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "alloydb.projects.locations.clusters.restore": + +type ProjectsLocationsClustersRestoreCall struct { + s *Service + parent string + restoreclusterrequest *RestoreClusterRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Restore: Creates a new Cluster in a given project and location, with +// a volume restored from the provided source, either a backup ID or a +// point-in-time and a source cluster. +// +// - parent: The name of the parent resource. For the required format, +// see the comment on the Cluster.name field. +func (r *ProjectsLocationsClustersService) Restore(parent string, restoreclusterrequest *RestoreClusterRequest) *ProjectsLocationsClustersRestoreCall { + c := &ProjectsLocationsClustersRestoreCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + c.restoreclusterrequest = restoreclusterrequest + 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 *ProjectsLocationsClustersRestoreCall) Fields(s ...googleapi.Field) *ProjectsLocationsClustersRestoreCall { + 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 *ProjectsLocationsClustersRestoreCall) Context(ctx context.Context) *ProjectsLocationsClustersRestoreCall { + 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 *ProjectsLocationsClustersRestoreCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsClustersRestoreCall) 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.restoreclusterrequest) + 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, "v1beta/{+parent}/clusters:restore") + 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 "alloydb.projects.locations.clusters.restore" 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 *ProjectsLocationsClustersRestoreCall) Do(opts ...googleapi.CallOption) (*Operation, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, gensupport.WrapError(&googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + }) + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, gensupport.WrapError(err) + } + ret := &Operation{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Creates a new Cluster in a given project and location, with a volume restored from the provided source, either a backup ID or a point-in-time and a source cluster.", + // "flatPath": "v1beta/projects/{projectsId}/locations/{locationsId}/clusters:restore", + // "httpMethod": "POST", + // "id": "alloydb.projects.locations.clusters.restore", + // "parameterOrder": [ + // "parent" + // ], + // "parameters": { + // "parent": { + // "description": "Required. The name of the parent resource. For the required format, see the comment on the Cluster.name field.", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1beta/{+parent}/clusters:restore", + // "request": { + // "$ref": "RestoreClusterRequest" + // }, + // "response": { + // "$ref": "Operation" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "alloydb.projects.locations.clusters.instances.create": + +type ProjectsLocationsClustersInstancesCreateCall struct { + s *Service + parent string + instance *Instance + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Create: Creates a new Instance in a given project and location. +// +// - parent: The name of the parent resource. For the required format, +// see the comment on the Instance.name field. +func (r *ProjectsLocationsClustersInstancesService) Create(parent string, instance *Instance) *ProjectsLocationsClustersInstancesCreateCall { + c := &ProjectsLocationsClustersInstancesCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + c.instance = instance + return c +} + +// InstanceId sets the optional parameter "instanceId": Required. ID of +// the requesting object. +func (c *ProjectsLocationsClustersInstancesCreateCall) InstanceId(instanceId string) *ProjectsLocationsClustersInstancesCreateCall { + c.urlParams_.Set("instanceId", instanceId) + return c +} + +// RequestId sets the optional parameter "requestId": An optional +// request ID to identify requests. Specify a unique request ID so that +// if you must retry your request, the server will know to ignore the +// request if it has already been completed. The server will guarantee +// that for at least 60 minutes since the first request. For example, +// consider a situation where you make an initial request and the +// request times out. If you make the request again with the same +// request ID, the server can check if original operation with the same +// request ID was received, and if so, will ignore the second request. +// This prevents clients from accidentally creating duplicate +// commitments. The request ID must be a valid UUID with the exception +// that zero UUID is not supported +// (00000000-0000-0000-0000-000000000000). +func (c *ProjectsLocationsClustersInstancesCreateCall) RequestId(requestId string) *ProjectsLocationsClustersInstancesCreateCall { + c.urlParams_.Set("requestId", requestId) + return c +} + +// ValidateOnly sets the optional parameter "validateOnly": If set, +// performs request validation (e.g. permission checks and any other +// type of validation), but do not actually execute the create request. +func (c *ProjectsLocationsClustersInstancesCreateCall) ValidateOnly(validateOnly bool) *ProjectsLocationsClustersInstancesCreateCall { + 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 *ProjectsLocationsClustersInstancesCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsClustersInstancesCreateCall { + 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 *ProjectsLocationsClustersInstancesCreateCall) Context(ctx context.Context) *ProjectsLocationsClustersInstancesCreateCall { + 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 *ProjectsLocationsClustersInstancesCreateCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsClustersInstancesCreateCall) 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.instance) + 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, "v1beta/{+parent}/instances") + 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 "alloydb.projects.locations.clusters.instances.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 *ProjectsLocationsClustersInstancesCreateCall) Do(opts ...googleapi.CallOption) (*Operation, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, gensupport.WrapError(&googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + }) + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, gensupport.WrapError(err) + } + ret := &Operation{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Creates a new Instance in a given project and location.", + // "flatPath": "v1beta/projects/{projectsId}/locations/{locationsId}/clusters/{clustersId}/instances", + // "httpMethod": "POST", + // "id": "alloydb.projects.locations.clusters.instances.create", + // "parameterOrder": [ + // "parent" + // ], + // "parameters": { + // "instanceId": { + // "description": "Required. ID of the requesting object.", + // "location": "query", + // "type": "string" + // }, + // "parent": { + // "description": "Required. The name of the parent resource. For the required format, see the comment on the Instance.name field.", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+/clusters/[^/]+$", + // "required": true, + // "type": "string" + // }, + // "requestId": { + // "description": "Optional. An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. The server will guarantee that for at least 60 minutes since the first request. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", + // "location": "query", + // "type": "string" + // }, + // "validateOnly": { + // "description": "Optional. If set, performs request validation (e.g. permission checks and any other type of validation), but do not actually execute the create request.", + // "location": "query", + // "type": "boolean" + // } + // }, + // "path": "v1beta/{+parent}/instances", + // "request": { + // "$ref": "Instance" + // }, + // "response": { + // "$ref": "Operation" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "alloydb.projects.locations.clusters.instances.createsecondary": + +type ProjectsLocationsClustersInstancesCreatesecondaryCall struct { + s *Service + parent string + instance *Instance + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Createsecondary: Creates a new SECONDARY Instance in a given project +// and location. +// +// - parent: The name of the parent resource. For the required format, +// see the comment on the Instance.name field. +func (r *ProjectsLocationsClustersInstancesService) Createsecondary(parent string, instance *Instance) *ProjectsLocationsClustersInstancesCreatesecondaryCall { + c := &ProjectsLocationsClustersInstancesCreatesecondaryCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + c.instance = instance + return c +} + +// InstanceId sets the optional parameter "instanceId": Required. ID of +// the requesting object. +func (c *ProjectsLocationsClustersInstancesCreatesecondaryCall) InstanceId(instanceId string) *ProjectsLocationsClustersInstancesCreatesecondaryCall { + c.urlParams_.Set("instanceId", instanceId) + return c +} + +// RequestId sets the optional parameter "requestId": An optional +// request ID to identify requests. Specify a unique request ID so that +// if you must retry your request, the server will know to ignore the +// request if it has already been completed. The server will guarantee +// that for at least 60 minutes since the first request. For example, +// consider a situation where you make an initial request and the +// request times out. If you make the request again with the same +// request ID, the server can check if original operation with the same +// request ID was received, and if so, will ignore the second request. +// This prevents clients from accidentally creating duplicate +// commitments. The request ID must be a valid UUID with the exception +// that zero UUID is not supported +// (00000000-0000-0000-0000-000000000000). +func (c *ProjectsLocationsClustersInstancesCreatesecondaryCall) RequestId(requestId string) *ProjectsLocationsClustersInstancesCreatesecondaryCall { + c.urlParams_.Set("requestId", requestId) + return c +} + +// ValidateOnly sets the optional parameter "validateOnly": If set, +// performs request validation (e.g. permission checks and any other +// type of validation), but do not actually execute the create request. +func (c *ProjectsLocationsClustersInstancesCreatesecondaryCall) ValidateOnly(validateOnly bool) *ProjectsLocationsClustersInstancesCreatesecondaryCall { + 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 *ProjectsLocationsClustersInstancesCreatesecondaryCall) Fields(s ...googleapi.Field) *ProjectsLocationsClustersInstancesCreatesecondaryCall { + 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 *ProjectsLocationsClustersInstancesCreatesecondaryCall) Context(ctx context.Context) *ProjectsLocationsClustersInstancesCreatesecondaryCall { + 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 *ProjectsLocationsClustersInstancesCreatesecondaryCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsClustersInstancesCreatesecondaryCall) 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.instance) + 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, "v1beta/{+parent}/instances:createsecondary") + 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 "alloydb.projects.locations.clusters.instances.createsecondary" 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 *ProjectsLocationsClustersInstancesCreatesecondaryCall) Do(opts ...googleapi.CallOption) (*Operation, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, gensupport.WrapError(&googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + }) + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, gensupport.WrapError(err) + } + ret := &Operation{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Creates a new SECONDARY Instance in a given project and location.", + // "flatPath": "v1beta/projects/{projectsId}/locations/{locationsId}/clusters/{clustersId}/instances:createsecondary", + // "httpMethod": "POST", + // "id": "alloydb.projects.locations.clusters.instances.createsecondary", + // "parameterOrder": [ + // "parent" + // ], + // "parameters": { + // "instanceId": { + // "description": "Required. ID of the requesting object.", + // "location": "query", + // "type": "string" + // }, + // "parent": { + // "description": "Required. The name of the parent resource. For the required format, see the comment on the Instance.name field.", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+/clusters/[^/]+$", + // "required": true, + // "type": "string" + // }, + // "requestId": { + // "description": "Optional. An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. The server will guarantee that for at least 60 minutes since the first request. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", + // "location": "query", + // "type": "string" + // }, + // "validateOnly": { + // "description": "Optional. If set, performs request validation (e.g. permission checks and any other type of validation), but do not actually execute the create request.", + // "location": "query", + // "type": "boolean" + // } + // }, + // "path": "v1beta/{+parent}/instances:createsecondary", + // "request": { + // "$ref": "Instance" + // }, + // "response": { + // "$ref": "Operation" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "alloydb.projects.locations.clusters.instances.delete": + +type ProjectsLocationsClustersInstancesDeleteCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Delete: Deletes a single Instance. +// +// - name: The name of the resource. For the required format, see the +// comment on the Instance.name field. +func (r *ProjectsLocationsClustersInstancesService) Delete(name string) *ProjectsLocationsClustersInstancesDeleteCall { + c := &ProjectsLocationsClustersInstancesDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + return c +} + +// Etag sets the optional parameter "etag": The current etag of the +// Instance. If an etag is provided and does not match the current etag +// of the Instance, deletion will be blocked and an ABORTED error will +// be returned. +func (c *ProjectsLocationsClustersInstancesDeleteCall) Etag(etag string) *ProjectsLocationsClustersInstancesDeleteCall { + c.urlParams_.Set("etag", etag) + return c +} + +// RequestId sets the optional parameter "requestId": An optional +// request ID to identify requests. Specify a unique request ID so that +// if you must retry your request, the server will know to ignore the +// request if it has already been completed. The server will guarantee +// that for at least 60 minutes after the first request. For example, +// consider a situation where you make an initial request and the +// request times out. If you make the request again with the same +// request ID, the server can check if original operation with the same +// request ID was received, and if so, will ignore the second request. +// This prevents clients from accidentally creating duplicate +// commitments. The request ID must be a valid UUID with the exception +// that zero UUID is not supported +// (00000000-0000-0000-0000-000000000000). +func (c *ProjectsLocationsClustersInstancesDeleteCall) RequestId(requestId string) *ProjectsLocationsClustersInstancesDeleteCall { + c.urlParams_.Set("requestId", requestId) + return c +} + +// ValidateOnly sets the optional parameter "validateOnly": If set, +// performs request validation (e.g. permission checks and any other +// type of validation), but do not actually execute the delete. +func (c *ProjectsLocationsClustersInstancesDeleteCall) ValidateOnly(validateOnly bool) *ProjectsLocationsClustersInstancesDeleteCall { + 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 *ProjectsLocationsClustersInstancesDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsClustersInstancesDeleteCall { + 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 *ProjectsLocationsClustersInstancesDeleteCall) Context(ctx context.Context) *ProjectsLocationsClustersInstancesDeleteCall { + 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 *ProjectsLocationsClustersInstancesDeleteCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsClustersInstancesDeleteCall) 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, "v1beta/{+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 "alloydb.projects.locations.clusters.instances.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 *ProjectsLocationsClustersInstancesDeleteCall) Do(opts ...googleapi.CallOption) (*Operation, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, gensupport.WrapError(&googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + }) + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, gensupport.WrapError(err) + } + ret := &Operation{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Deletes a single Instance.", + // "flatPath": "v1beta/projects/{projectsId}/locations/{locationsId}/clusters/{clustersId}/instances/{instancesId}", + // "httpMethod": "DELETE", + // "id": "alloydb.projects.locations.clusters.instances.delete", + // "parameterOrder": [ + // "name" + // ], + // "parameters": { + // "etag": { + // "description": "Optional. The current etag of the Instance. If an etag is provided and does not match the current etag of the Instance, deletion will be blocked and an ABORTED error will be returned.", + // "location": "query", + // "type": "string" + // }, + // "name": { + // "description": "Required. The name of the resource. For the required format, see the comment on the Instance.name field.", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+/clusters/[^/]+/instances/[^/]+$", + // "required": true, + // "type": "string" + // }, + // "requestId": { + // "description": "Optional. An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. The server will guarantee that for at least 60 minutes after the first request. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", + // "location": "query", + // "type": "string" + // }, + // "validateOnly": { + // "description": "Optional. If set, performs request validation (e.g. permission checks and any other type of validation), but do not actually execute the delete.", + // "location": "query", + // "type": "boolean" + // } + // }, + // "path": "v1beta/{+name}", + // "response": { + // "$ref": "Operation" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "alloydb.projects.locations.clusters.instances.failover": + +type ProjectsLocationsClustersInstancesFailoverCall struct { + s *Service + name string + failoverinstancerequest *FailoverInstanceRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Failover: Forces a Failover for a highly available instance. Failover +// promotes the HA standby instance as the new primary. Imperative only. +// +// - name: The name of the resource. For the required format, see the +// comment on the Instance.name field. +func (r *ProjectsLocationsClustersInstancesService) Failover(name string, failoverinstancerequest *FailoverInstanceRequest) *ProjectsLocationsClustersInstancesFailoverCall { + c := &ProjectsLocationsClustersInstancesFailoverCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + c.failoverinstancerequest = failoverinstancerequest + 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 *ProjectsLocationsClustersInstancesFailoverCall) Fields(s ...googleapi.Field) *ProjectsLocationsClustersInstancesFailoverCall { + 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 *ProjectsLocationsClustersInstancesFailoverCall) Context(ctx context.Context) *ProjectsLocationsClustersInstancesFailoverCall { + 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 *ProjectsLocationsClustersInstancesFailoverCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsClustersInstancesFailoverCall) 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.failoverinstancerequest) + 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, "v1beta/{+name}:failover") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("POST", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "name": c.name, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "alloydb.projects.locations.clusters.instances.failover" 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 *ProjectsLocationsClustersInstancesFailoverCall) Do(opts ...googleapi.CallOption) (*Operation, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, gensupport.WrapError(&googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + }) + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, gensupport.WrapError(err) + } + ret := &Operation{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Forces a Failover for a highly available instance. Failover promotes the HA standby instance as the new primary. Imperative only.", + // "flatPath": "v1beta/projects/{projectsId}/locations/{locationsId}/clusters/{clustersId}/instances/{instancesId}:failover", + // "httpMethod": "POST", + // "id": "alloydb.projects.locations.clusters.instances.failover", + // "parameterOrder": [ + // "name" + // ], + // "parameters": { + // "name": { + // "description": "Required. The name of the resource. For the required format, see the comment on the Instance.name field.", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+/clusters/[^/]+/instances/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1beta/{+name}:failover", + // "request": { + // "$ref": "FailoverInstanceRequest" + // }, + // "response": { + // "$ref": "Operation" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "alloydb.projects.locations.clusters.instances.get": + +type ProjectsLocationsClustersInstancesGetCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// Get: Gets details of a single Instance. +// +// - name: The name of the resource. For the required format, see the +// comment on the Instance.name field. +func (r *ProjectsLocationsClustersInstancesService) Get(name string) *ProjectsLocationsClustersInstancesGetCall { + c := &ProjectsLocationsClustersInstancesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + return c +} + +// View sets the optional parameter "view": The view of the instance to +// return. +// +// Possible values: +// +// "INSTANCE_VIEW_UNSPECIFIED" - INSTANCE_VIEW_UNSPECIFIED Not +// +// specified, equivalent to BASIC. +// +// "INSTANCE_VIEW_BASIC" - BASIC server responses for a primary or +// +// read instance include all the relevant instance details, excluding +// the details of each node in the instance. The default value. +// +// "INSTANCE_VIEW_FULL" - FULL response is equivalent to BASIC for +// +// primary instance (for now). For read pool instance, this includes +// details of each node in the pool. +func (c *ProjectsLocationsClustersInstancesGetCall) View(view string) *ProjectsLocationsClustersInstancesGetCall { + 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 *ProjectsLocationsClustersInstancesGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsClustersInstancesGetCall { + 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 *ProjectsLocationsClustersInstancesGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsClustersInstancesGetCall { + 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 *ProjectsLocationsClustersInstancesGetCall) Context(ctx context.Context) *ProjectsLocationsClustersInstancesGetCall { + 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 *ProjectsLocationsClustersInstancesGetCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsClustersInstancesGetCall) 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, "v1beta/{+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 "alloydb.projects.locations.clusters.instances.get" call. +// Exactly one of *Instance or error will be non-nil. Any non-2xx status +// code is an error. Response headers are in either +// *Instance.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 *ProjectsLocationsClustersInstancesGetCall) Do(opts ...googleapi.CallOption) (*Instance, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, gensupport.WrapError(&googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + }) + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, gensupport.WrapError(err) + } + ret := &Instance{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Gets details of a single Instance.", + // "flatPath": "v1beta/projects/{projectsId}/locations/{locationsId}/clusters/{clustersId}/instances/{instancesId}", + // "httpMethod": "GET", + // "id": "alloydb.projects.locations.clusters.instances.get", + // "parameterOrder": [ + // "name" + // ], + // "parameters": { + // "name": { + // "description": "Required. The name of the resource. For the required format, see the comment on the Instance.name field.", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+/clusters/[^/]+/instances/[^/]+$", + // "required": true, + // "type": "string" + // }, + // "view": { + // "description": "The view of the instance to return.", + // "enum": [ + // "INSTANCE_VIEW_UNSPECIFIED", + // "INSTANCE_VIEW_BASIC", + // "INSTANCE_VIEW_FULL" + // ], + // "enumDescriptions": [ + // "INSTANCE_VIEW_UNSPECIFIED Not specified, equivalent to BASIC.", + // "BASIC server responses for a primary or read instance include all the relevant instance details, excluding the details of each node in the instance. The default value.", + // "FULL response is equivalent to BASIC for primary instance (for now). For read pool instance, this includes details of each node in the pool." + // ], + // "location": "query", + // "type": "string" + // } + // }, + // "path": "v1beta/{+name}", + // "response": { + // "$ref": "Instance" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "alloydb.projects.locations.clusters.instances.getConnectionInfo": + +type ProjectsLocationsClustersInstancesGetConnectionInfoCall struct { + s *Service + parent string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// GetConnectionInfo: Get instance metadata used for a connection. +// +// - parent: The name of the parent resource. The required format is: +// projects/{project}/locations/{location}/clusters/{cluster}/instances +// /{instance}. +func (r *ProjectsLocationsClustersInstancesService) GetConnectionInfo(parent string) *ProjectsLocationsClustersInstancesGetConnectionInfoCall { + c := &ProjectsLocationsClustersInstancesGetConnectionInfoCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + return c +} + +// RequestId sets the optional parameter "requestId": An optional +// request ID to identify requests. Specify a unique request ID so that +// if you must retry your request, the server will know to ignore the +// request if it has already been completed. The server will guarantee +// that for at least 60 minutes after the first request. For example, +// consider a situation where you make an initial request and the +// request times out. If you make the request again with the same +// request ID, the server can check if original operation with the same +// request ID was received, and if so, will ignore the second request. +// This prevents clients from accidentally creating duplicate +// commitments. The request ID must be a valid UUID with the exception +// that zero UUID is not supported +// (00000000-0000-0000-0000-000000000000). +func (c *ProjectsLocationsClustersInstancesGetConnectionInfoCall) RequestId(requestId string) *ProjectsLocationsClustersInstancesGetConnectionInfoCall { + c.urlParams_.Set("requestId", requestId) + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *ProjectsLocationsClustersInstancesGetConnectionInfoCall) Fields(s ...googleapi.Field) *ProjectsLocationsClustersInstancesGetConnectionInfoCall { + 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 *ProjectsLocationsClustersInstancesGetConnectionInfoCall) IfNoneMatch(entityTag string) *ProjectsLocationsClustersInstancesGetConnectionInfoCall { + 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 *ProjectsLocationsClustersInstancesGetConnectionInfoCall) Context(ctx context.Context) *ProjectsLocationsClustersInstancesGetConnectionInfoCall { + 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 *ProjectsLocationsClustersInstancesGetConnectionInfoCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsClustersInstancesGetConnectionInfoCall) 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, "v1beta/{+parent}/connectionInfo") + 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 "alloydb.projects.locations.clusters.instances.getConnectionInfo" call. +// Exactly one of *ConnectionInfo or error will be non-nil. Any non-2xx +// status code is an error. Response headers are in either +// *ConnectionInfo.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 *ProjectsLocationsClustersInstancesGetConnectionInfoCall) Do(opts ...googleapi.CallOption) (*ConnectionInfo, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, gensupport.WrapError(&googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + }) + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, gensupport.WrapError(err) + } + ret := &ConnectionInfo{ + 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 instance metadata used for a connection.", + // "flatPath": "v1beta/projects/{projectsId}/locations/{locationsId}/clusters/{clustersId}/instances/{instancesId}/connectionInfo", + // "httpMethod": "GET", + // "id": "alloydb.projects.locations.clusters.instances.getConnectionInfo", + // "parameterOrder": [ + // "parent" + // ], + // "parameters": { + // "parent": { + // "description": "Required. The name of the parent resource. The required format is: projects/{project}/locations/{location}/clusters/{cluster}/instances/{instance}", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+/clusters/[^/]+/instances/[^/]+$", + // "required": true, + // "type": "string" + // }, + // "requestId": { + // "description": "Optional. An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. The server will guarantee that for at least 60 minutes after the first request. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", + // "location": "query", + // "type": "string" + // } + // }, + // "path": "v1beta/{+parent}/connectionInfo", + // "response": { + // "$ref": "ConnectionInfo" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "alloydb.projects.locations.clusters.instances.injectFault": + +type ProjectsLocationsClustersInstancesInjectFaultCall struct { + s *Service + name string + injectfaultrequest *InjectFaultRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// InjectFault: Injects fault in an instance. Imperative only. +// +// - name: The name of the resource. For the required format, see the +// comment on the Instance.name field. +func (r *ProjectsLocationsClustersInstancesService) InjectFault(name string, injectfaultrequest *InjectFaultRequest) *ProjectsLocationsClustersInstancesInjectFaultCall { + c := &ProjectsLocationsClustersInstancesInjectFaultCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + c.injectfaultrequest = injectfaultrequest + 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 *ProjectsLocationsClustersInstancesInjectFaultCall) Fields(s ...googleapi.Field) *ProjectsLocationsClustersInstancesInjectFaultCall { + 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 *ProjectsLocationsClustersInstancesInjectFaultCall) Context(ctx context.Context) *ProjectsLocationsClustersInstancesInjectFaultCall { + 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 *ProjectsLocationsClustersInstancesInjectFaultCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsClustersInstancesInjectFaultCall) 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.injectfaultrequest) + 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, "v1beta/{+name}:injectFault") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("POST", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "name": c.name, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "alloydb.projects.locations.clusters.instances.injectFault" 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 *ProjectsLocationsClustersInstancesInjectFaultCall) Do(opts ...googleapi.CallOption) (*Operation, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, gensupport.WrapError(&googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + }) + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, gensupport.WrapError(err) + } + ret := &Operation{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Injects fault in an instance. Imperative only.", + // "flatPath": "v1beta/projects/{projectsId}/locations/{locationsId}/clusters/{clustersId}/instances/{instancesId}:injectFault", + // "httpMethod": "POST", + // "id": "alloydb.projects.locations.clusters.instances.injectFault", + // "parameterOrder": [ + // "name" + // ], + // "parameters": { + // "name": { + // "description": "Required. The name of the resource. For the required format, see the comment on the Instance.name field.", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+/clusters/[^/]+/instances/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1beta/{+name}:injectFault", + // "request": { + // "$ref": "InjectFaultRequest" + // }, + // "response": { + // "$ref": "Operation" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "alloydb.projects.locations.clusters.instances.list": + +type ProjectsLocationsClustersInstancesListCall struct { + s *Service + parent string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// List: Lists Instances in a given project and location. +// +// - parent: The name of the parent resource. For the required format, +// see the comment on the Instance.name field. Additionally, you can +// perform an aggregated list operation by specifying a value with one +// of the following formats: * +// projects/{project}/locations/-/clusters/- * +// projects/{project}/locations/{region}/clusters/-. +func (r *ProjectsLocationsClustersInstancesService) List(parent string) *ProjectsLocationsClustersInstancesListCall { + c := &ProjectsLocationsClustersInstancesListCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + return c +} + +// Filter sets the optional parameter "filter": Filtering results +func (c *ProjectsLocationsClustersInstancesListCall) Filter(filter string) *ProjectsLocationsClustersInstancesListCall { + c.urlParams_.Set("filter", filter) + return c +} + +// OrderBy sets the optional parameter "orderBy": Hint for how to order +// the results +func (c *ProjectsLocationsClustersInstancesListCall) OrderBy(orderBy string) *ProjectsLocationsClustersInstancesListCall { + c.urlParams_.Set("orderBy", orderBy) + return c +} + +// PageSize sets the optional parameter "pageSize": Requested page size. +// Server may return fewer items than requested. If unspecified, server +// will pick an appropriate default. +func (c *ProjectsLocationsClustersInstancesListCall) PageSize(pageSize int64) *ProjectsLocationsClustersInstancesListCall { + c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) + return c +} + +// PageToken sets the optional parameter "pageToken": A token +// identifying a page of results the server should return. +func (c *ProjectsLocationsClustersInstancesListCall) PageToken(pageToken string) *ProjectsLocationsClustersInstancesListCall { + 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 *ProjectsLocationsClustersInstancesListCall) Fields(s ...googleapi.Field) *ProjectsLocationsClustersInstancesListCall { + 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 *ProjectsLocationsClustersInstancesListCall) IfNoneMatch(entityTag string) *ProjectsLocationsClustersInstancesListCall { + 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 *ProjectsLocationsClustersInstancesListCall) Context(ctx context.Context) *ProjectsLocationsClustersInstancesListCall { + 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 *ProjectsLocationsClustersInstancesListCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsClustersInstancesListCall) 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, "v1beta/{+parent}/instances") + 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 "alloydb.projects.locations.clusters.instances.list" call. +// Exactly one of *ListInstancesResponse or error will be non-nil. Any +// non-2xx status code is an error. Response headers are in either +// *ListInstancesResponse.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 *ProjectsLocationsClustersInstancesListCall) Do(opts ...googleapi.CallOption) (*ListInstancesResponse, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, gensupport.WrapError(&googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + }) + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, gensupport.WrapError(err) + } + ret := &ListInstancesResponse{ + 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 Instances in a given project and location.", + // "flatPath": "v1beta/projects/{projectsId}/locations/{locationsId}/clusters/{clustersId}/instances", + // "httpMethod": "GET", + // "id": "alloydb.projects.locations.clusters.instances.list", + // "parameterOrder": [ + // "parent" + // ], + // "parameters": { + // "filter": { + // "description": "Optional. Filtering results", + // "location": "query", + // "type": "string" + // }, + // "orderBy": { + // "description": "Optional. Hint for how to order the results", + // "location": "query", + // "type": "string" + // }, + // "pageSize": { + // "description": "Optional. Requested page size. Server may return fewer items than requested. If unspecified, server will pick an appropriate default.", + // "format": "int32", + // "location": "query", + // "type": "integer" + // }, + // "pageToken": { + // "description": "A token identifying a page of results the server should return.", + // "location": "query", + // "type": "string" + // }, + // "parent": { + // "description": "Required. The name of the parent resource. For the required format, see the comment on the Instance.name field. Additionally, you can perform an aggregated list operation by specifying a value with one of the following formats: * projects/{project}/locations/-/clusters/- * projects/{project}/locations/{region}/clusters/-", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+/clusters/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1beta/{+parent}/instances", + // "response": { + // "$ref": "ListInstancesResponse" + // }, + // "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 *ProjectsLocationsClustersInstancesListCall) Pages(ctx context.Context, f func(*ListInstancesResponse) 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 "alloydb.projects.locations.clusters.instances.patch": + +type ProjectsLocationsClustersInstancesPatchCall struct { + s *Service + name string + instance *Instance + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Patch: Updates the parameters of a single Instance. +// +// - name: Output only. The name of the instance resource with the +// format: * +// projects/{project}/locations/{region}/clusters/{cluster_id}/instance +// s/{instance_id} where the cluster and instance ID segments should +// satisfy the regex expression `[a-z]([a-z0-9-]{0,61}[a-z0-9])?`, +// e.g. 1-63 characters of lowercase letters, numbers, and dashes, +// starting with a letter, and ending with a letter or number. For +// more details see https://google.aip.dev/122. The prefix of the +// instance resource name is the name of the parent resource: * +// projects/{project}/locations/{region}/clusters/{cluster_id}. +func (r *ProjectsLocationsClustersInstancesService) Patch(name string, instance *Instance) *ProjectsLocationsClustersInstancesPatchCall { + c := &ProjectsLocationsClustersInstancesPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + c.instance = instance + return c +} + +// AllowMissing sets the optional parameter "allowMissing": If set to +// true, update succeeds even if instance is not found. In that case, a +// new instance is created and `update_mask` is ignored. +func (c *ProjectsLocationsClustersInstancesPatchCall) AllowMissing(allowMissing bool) *ProjectsLocationsClustersInstancesPatchCall { + c.urlParams_.Set("allowMissing", fmt.Sprint(allowMissing)) + return c +} + +// RequestId sets the optional parameter "requestId": An optional +// request ID to identify requests. Specify a unique request ID so that +// if you must retry your request, the server will know to ignore the +// request if it has already been completed. The server will guarantee +// that for at least 60 minutes since the first request. For example, +// consider a situation where you make an initial request and the +// request times out. If you make the request again with the same +// request ID, the server can check if original operation with the same +// request ID was received, and if so, will ignore the second request. +// This prevents clients from accidentally creating duplicate +// commitments. The request ID must be a valid UUID with the exception +// that zero UUID is not supported +// (00000000-0000-0000-0000-000000000000). +func (c *ProjectsLocationsClustersInstancesPatchCall) RequestId(requestId string) *ProjectsLocationsClustersInstancesPatchCall { + c.urlParams_.Set("requestId", requestId) + return c +} + +// UpdateMask sets the optional parameter "updateMask": Field mask is +// used to specify the fields to be overwritten in the Instance resource +// by the update. The fields specified in the update_mask are relative +// to the resource, not the full request. A field will be overwritten if +// it is in the mask. If the user does not provide a mask then all +// fields will be overwritten. +func (c *ProjectsLocationsClustersInstancesPatchCall) UpdateMask(updateMask string) *ProjectsLocationsClustersInstancesPatchCall { + c.urlParams_.Set("updateMask", updateMask) + return c +} + +// ValidateOnly sets the optional parameter "validateOnly": If set, +// performs request validation (e.g. permission checks and any other +// type of validation), but do not actually execute the update request. +func (c *ProjectsLocationsClustersInstancesPatchCall) ValidateOnly(validateOnly bool) *ProjectsLocationsClustersInstancesPatchCall { + 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 *ProjectsLocationsClustersInstancesPatchCall) Fields(s ...googleapi.Field) *ProjectsLocationsClustersInstancesPatchCall { + 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 *ProjectsLocationsClustersInstancesPatchCall) Context(ctx context.Context) *ProjectsLocationsClustersInstancesPatchCall { + 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 *ProjectsLocationsClustersInstancesPatchCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsClustersInstancesPatchCall) 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.instance) + 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, "v1beta/{+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 "alloydb.projects.locations.clusters.instances.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 *ProjectsLocationsClustersInstancesPatchCall) Do(opts ...googleapi.CallOption) (*Operation, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, gensupport.WrapError(&googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + }) + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, gensupport.WrapError(err) + } + ret := &Operation{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Updates the parameters of a single Instance.", + // "flatPath": "v1beta/projects/{projectsId}/locations/{locationsId}/clusters/{clustersId}/instances/{instancesId}", + // "httpMethod": "PATCH", + // "id": "alloydb.projects.locations.clusters.instances.patch", + // "parameterOrder": [ + // "name" + // ], + // "parameters": { + // "allowMissing": { + // "description": "Optional. If set to true, update succeeds even if instance is not found. In that case, a new instance is created and `update_mask` is ignored.", + // "location": "query", + // "type": "boolean" + // }, + // "name": { + // "description": "Output only. The name of the instance resource with the format: * projects/{project}/locations/{region}/clusters/{cluster_id}/instances/{instance_id} where the cluster and instance ID segments should satisfy the regex expression `[a-z]([a-z0-9-]{0,61}[a-z0-9])?`, e.g. 1-63 characters of lowercase letters, numbers, and dashes, starting with a letter, and ending with a letter or number. For more details see https://google.aip.dev/122. The prefix of the instance resource name is the name of the parent resource: * projects/{project}/locations/{region}/clusters/{cluster_id}", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+/clusters/[^/]+/instances/[^/]+$", + // "required": true, + // "type": "string" + // }, + // "requestId": { + // "description": "Optional. An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. The server will guarantee that for at least 60 minutes since the first request. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", + // "location": "query", + // "type": "string" + // }, + // "updateMask": { + // "description": "Optional. Field mask is used to specify the fields to be overwritten in the Instance resource by the update. The fields specified in the update_mask are relative to the resource, not the full request. A field will be overwritten if it is in the mask. If the user does not provide a mask then all fields will be overwritten.", + // "format": "google-fieldmask", + // "location": "query", + // "type": "string" + // }, + // "validateOnly": { + // "description": "Optional. If set, performs request validation (e.g. permission checks and any other type of validation), but do not actually execute the update request.", + // "location": "query", + // "type": "boolean" + // } + // }, + // "path": "v1beta/{+name}", + // "request": { + // "$ref": "Instance" + // }, + // "response": { + // "$ref": "Operation" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "alloydb.projects.locations.clusters.instances.restart": + +type ProjectsLocationsClustersInstancesRestartCall struct { + s *Service + name string + restartinstancerequest *RestartInstanceRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Restart: Restart an Instance in a cluster. Imperative only. +// +// - name: The name of the resource. For the required format, see the +// comment on the Instance.name field. +func (r *ProjectsLocationsClustersInstancesService) Restart(name string, restartinstancerequest *RestartInstanceRequest) *ProjectsLocationsClustersInstancesRestartCall { + c := &ProjectsLocationsClustersInstancesRestartCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + c.restartinstancerequest = restartinstancerequest + 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 *ProjectsLocationsClustersInstancesRestartCall) Fields(s ...googleapi.Field) *ProjectsLocationsClustersInstancesRestartCall { + 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 *ProjectsLocationsClustersInstancesRestartCall) Context(ctx context.Context) *ProjectsLocationsClustersInstancesRestartCall { + 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 *ProjectsLocationsClustersInstancesRestartCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsClustersInstancesRestartCall) 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.restartinstancerequest) + 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, "v1beta/{+name}:restart") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("POST", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "name": c.name, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "alloydb.projects.locations.clusters.instances.restart" 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 *ProjectsLocationsClustersInstancesRestartCall) Do(opts ...googleapi.CallOption) (*Operation, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, gensupport.WrapError(&googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + }) + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, gensupport.WrapError(err) + } + ret := &Operation{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Restart an Instance in a cluster. Imperative only.", + // "flatPath": "v1beta/projects/{projectsId}/locations/{locationsId}/clusters/{clustersId}/instances/{instancesId}:restart", + // "httpMethod": "POST", + // "id": "alloydb.projects.locations.clusters.instances.restart", + // "parameterOrder": [ + // "name" + // ], + // "parameters": { + // "name": { + // "description": "Required. The name of the resource. For the required format, see the comment on the Instance.name field.", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+/clusters/[^/]+/instances/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1beta/{+name}:restart", + // "request": { + // "$ref": "RestartInstanceRequest" + // }, + // "response": { + // "$ref": "Operation" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "alloydb.projects.locations.clusters.users.create": + +type ProjectsLocationsClustersUsersCreateCall struct { + s *Service + parent string + user *User + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Create: Creates a new User in a given project, location, and cluster. +// +// - parent: Value for parent. +func (r *ProjectsLocationsClustersUsersService) Create(parent string, user *User) *ProjectsLocationsClustersUsersCreateCall { + c := &ProjectsLocationsClustersUsersCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + c.user = user + return c +} + +// RequestId sets the optional parameter "requestId": An optional +// request ID to identify requests. Specify a unique request ID so that +// if you must retry your request, the server will know to ignore the +// request if it has already been completed. The server will guarantee +// that for at least 60 minutes since the first request. For example, +// consider a situation where you make an initial request and the +// request times out. If you make the request again with the same +// request ID, the server can check if original operation with the same +// request ID was received, and if so, will ignore the second request. +// This prevents clients from accidentally creating duplicate +// commitments. The request ID must be a valid UUID with the exception +// that zero UUID is not supported +// (00000000-0000-0000-0000-000000000000). +func (c *ProjectsLocationsClustersUsersCreateCall) RequestId(requestId string) *ProjectsLocationsClustersUsersCreateCall { + c.urlParams_.Set("requestId", requestId) + return c +} + +// UserId sets the optional parameter "userId": Required. ID of the +// requesting object. +func (c *ProjectsLocationsClustersUsersCreateCall) UserId(userId string) *ProjectsLocationsClustersUsersCreateCall { + c.urlParams_.Set("userId", userId) + return c +} + +// ValidateOnly sets the optional parameter "validateOnly": If set, the +// backend validates the request, but doesn't actually execute it. +func (c *ProjectsLocationsClustersUsersCreateCall) ValidateOnly(validateOnly bool) *ProjectsLocationsClustersUsersCreateCall { + 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 *ProjectsLocationsClustersUsersCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsClustersUsersCreateCall { + 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 *ProjectsLocationsClustersUsersCreateCall) Context(ctx context.Context) *ProjectsLocationsClustersUsersCreateCall { + 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 *ProjectsLocationsClustersUsersCreateCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsClustersUsersCreateCall) 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.user) + 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, "v1beta/{+parent}/users") + 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 "alloydb.projects.locations.clusters.users.create" call. +// Exactly one of *User or error will be non-nil. Any non-2xx status +// code is an error. Response headers are in either +// *User.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 *ProjectsLocationsClustersUsersCreateCall) Do(opts ...googleapi.CallOption) (*User, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, gensupport.WrapError(&googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + }) + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, gensupport.WrapError(err) + } + ret := &User{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Creates a new User in a given project, location, and cluster.", + // "flatPath": "v1beta/projects/{projectsId}/locations/{locationsId}/clusters/{clustersId}/users", + // "httpMethod": "POST", + // "id": "alloydb.projects.locations.clusters.users.create", + // "parameterOrder": [ + // "parent" + // ], + // "parameters": { + // "parent": { + // "description": "Required. Value for parent.", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+/clusters/[^/]+$", + // "required": true, + // "type": "string" + // }, + // "requestId": { + // "description": "Optional. An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. The server will guarantee that for at least 60 minutes since the first request. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", + // "location": "query", + // "type": "string" + // }, + // "userId": { + // "description": "Required. ID of the requesting object.", + // "location": "query", + // "type": "string" + // }, + // "validateOnly": { + // "description": "Optional. If set, the backend validates the request, but doesn't actually execute it.", + // "location": "query", + // "type": "boolean" + // } + // }, + // "path": "v1beta/{+parent}/users", + // "request": { + // "$ref": "User" + // }, + // "response": { + // "$ref": "User" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "alloydb.projects.locations.clusters.users.delete": + +type ProjectsLocationsClustersUsersDeleteCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Delete: Deletes a single User. +// +// - name: The name of the resource. For the required format, see the +// comment on the User.name field. +func (r *ProjectsLocationsClustersUsersService) Delete(name string) *ProjectsLocationsClustersUsersDeleteCall { + c := &ProjectsLocationsClustersUsersDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + return c +} + +// RequestId sets the optional parameter "requestId": An optional +// request ID to identify requests. Specify a unique request ID so that +// if you must retry your request, the server will know to ignore the +// request if it has already been completed. The server will guarantee +// that for at least 60 minutes after the first request. For example, +// consider a situation where you make an initial request and the +// request times out. If you make the request again with the same +// request ID, the server can check if original operation with the same +// request ID was received, and if so, will ignore the second request. +// This prevents clients from accidentally creating duplicate +// commitments. The request ID must be a valid UUID with the exception +// that zero UUID is not supported +// (00000000-0000-0000-0000-000000000000). +func (c *ProjectsLocationsClustersUsersDeleteCall) RequestId(requestId string) *ProjectsLocationsClustersUsersDeleteCall { + c.urlParams_.Set("requestId", requestId) + return c +} + +// ValidateOnly sets the optional parameter "validateOnly": If set, the +// backend validates the request, but doesn't actually execute it. +func (c *ProjectsLocationsClustersUsersDeleteCall) ValidateOnly(validateOnly bool) *ProjectsLocationsClustersUsersDeleteCall { + 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 *ProjectsLocationsClustersUsersDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsClustersUsersDeleteCall { + 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 *ProjectsLocationsClustersUsersDeleteCall) Context(ctx context.Context) *ProjectsLocationsClustersUsersDeleteCall { + 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 *ProjectsLocationsClustersUsersDeleteCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsClustersUsersDeleteCall) 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, "v1beta/{+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 "alloydb.projects.locations.clusters.users.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 *ProjectsLocationsClustersUsersDeleteCall) Do(opts ...googleapi.CallOption) (*Empty, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, gensupport.WrapError(&googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + }) + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, gensupport.WrapError(err) + } + ret := &Empty{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Deletes a single User.", + // "flatPath": "v1beta/projects/{projectsId}/locations/{locationsId}/clusters/{clustersId}/users/{usersId}", + // "httpMethod": "DELETE", + // "id": "alloydb.projects.locations.clusters.users.delete", + // "parameterOrder": [ + // "name" + // ], + // "parameters": { + // "name": { + // "description": "Required. The name of the resource. For the required format, see the comment on the User.name field.", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+/clusters/[^/]+/users/[^/]+$", + // "required": true, + // "type": "string" + // }, + // "requestId": { + // "description": "Optional. An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. The server will guarantee that for at least 60 minutes after the first request. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", + // "location": "query", + // "type": "string" + // }, + // "validateOnly": { + // "description": "Optional. If set, the backend validates the request, but doesn't actually execute it.", + // "location": "query", + // "type": "boolean" + // } + // }, + // "path": "v1beta/{+name}", + // "response": { + // "$ref": "Empty" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "alloydb.projects.locations.clusters.users.get": + +type ProjectsLocationsClustersUsersGetCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// Get: Gets details of a single User. +// +// - name: The name of the resource. For the required format, see the +// comment on the User.name field. +func (r *ProjectsLocationsClustersUsersService) Get(name string) *ProjectsLocationsClustersUsersGetCall { + c := &ProjectsLocationsClustersUsersGetCall{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 *ProjectsLocationsClustersUsersGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsClustersUsersGetCall { + 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 *ProjectsLocationsClustersUsersGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsClustersUsersGetCall { + 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 *ProjectsLocationsClustersUsersGetCall) Context(ctx context.Context) *ProjectsLocationsClustersUsersGetCall { + 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 *ProjectsLocationsClustersUsersGetCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsClustersUsersGetCall) 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, "v1beta/{+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 "alloydb.projects.locations.clusters.users.get" call. +// Exactly one of *User or error will be non-nil. Any non-2xx status +// code is an error. Response headers are in either +// *User.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 *ProjectsLocationsClustersUsersGetCall) Do(opts ...googleapi.CallOption) (*User, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, gensupport.WrapError(&googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + }) + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, gensupport.WrapError(err) + } + ret := &User{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Gets details of a single User.", + // "flatPath": "v1beta/projects/{projectsId}/locations/{locationsId}/clusters/{clustersId}/users/{usersId}", + // "httpMethod": "GET", + // "id": "alloydb.projects.locations.clusters.users.get", + // "parameterOrder": [ + // "name" + // ], + // "parameters": { + // "name": { + // "description": "Required. The name of the resource. For the required format, see the comment on the User.name field.", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+/clusters/[^/]+/users/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1beta/{+name}", + // "response": { + // "$ref": "User" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "alloydb.projects.locations.clusters.users.list": + +type ProjectsLocationsClustersUsersListCall struct { + s *Service + parent string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// List: Lists Users in a given project and location. +// +// - parent: Parent value for ListUsersRequest. +func (r *ProjectsLocationsClustersUsersService) List(parent string) *ProjectsLocationsClustersUsersListCall { + c := &ProjectsLocationsClustersUsersListCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + return c +} + +// Filter sets the optional parameter "filter": Filtering results +func (c *ProjectsLocationsClustersUsersListCall) Filter(filter string) *ProjectsLocationsClustersUsersListCall { + c.urlParams_.Set("filter", filter) + return c +} + +// OrderBy sets the optional parameter "orderBy": Hint for how to order +// the results +func (c *ProjectsLocationsClustersUsersListCall) OrderBy(orderBy string) *ProjectsLocationsClustersUsersListCall { + c.urlParams_.Set("orderBy", orderBy) + return c +} + +// PageSize sets the optional parameter "pageSize": Requested page size. +// Server may return fewer items than requested. If unspecified, server +// will pick an appropriate default. +func (c *ProjectsLocationsClustersUsersListCall) PageSize(pageSize int64) *ProjectsLocationsClustersUsersListCall { + c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) + return c +} + +// PageToken sets the optional parameter "pageToken": A token +// identifying a page of results the server should return. +func (c *ProjectsLocationsClustersUsersListCall) PageToken(pageToken string) *ProjectsLocationsClustersUsersListCall { + 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 *ProjectsLocationsClustersUsersListCall) Fields(s ...googleapi.Field) *ProjectsLocationsClustersUsersListCall { + 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 *ProjectsLocationsClustersUsersListCall) IfNoneMatch(entityTag string) *ProjectsLocationsClustersUsersListCall { + 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 *ProjectsLocationsClustersUsersListCall) Context(ctx context.Context) *ProjectsLocationsClustersUsersListCall { + 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 *ProjectsLocationsClustersUsersListCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsClustersUsersListCall) 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, "v1beta/{+parent}/users") + 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 "alloydb.projects.locations.clusters.users.list" call. +// Exactly one of *ListUsersResponse or error will be non-nil. Any +// non-2xx status code is an error. Response headers are in either +// *ListUsersResponse.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 *ProjectsLocationsClustersUsersListCall) Do(opts ...googleapi.CallOption) (*ListUsersResponse, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, gensupport.WrapError(&googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + }) + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, gensupport.WrapError(err) + } + ret := &ListUsersResponse{ + 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 Users in a given project and location.", + // "flatPath": "v1beta/projects/{projectsId}/locations/{locationsId}/clusters/{clustersId}/users", + // "httpMethod": "GET", + // "id": "alloydb.projects.locations.clusters.users.list", + // "parameterOrder": [ + // "parent" + // ], + // "parameters": { + // "filter": { + // "description": "Optional. Filtering results", + // "location": "query", + // "type": "string" + // }, + // "orderBy": { + // "description": "Optional. Hint for how to order the results", + // "location": "query", + // "type": "string" + // }, + // "pageSize": { + // "description": "Optional. Requested page size. Server may return fewer items than requested. If unspecified, server will pick an appropriate default.", + // "format": "int32", + // "location": "query", + // "type": "integer" + // }, + // "pageToken": { + // "description": "Optional. A token identifying a page of results the server should return.", + // "location": "query", + // "type": "string" + // }, + // "parent": { + // "description": "Required. Parent value for ListUsersRequest", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+/clusters/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1beta/{+parent}/users", + // "response": { + // "$ref": "ListUsersResponse" + // }, + // "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 *ProjectsLocationsClustersUsersListCall) Pages(ctx context.Context, f func(*ListUsersResponse) 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 "alloydb.projects.locations.clusters.users.patch": + +type ProjectsLocationsClustersUsersPatchCall struct { + s *Service + name string + user *User + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Patch: Updates the parameters of a single User. +// +// - name: Output only. Name of the resource in the form of +// projects/{project}/locations/{location}/cluster/{cluster}/users/{use +// r}. +func (r *ProjectsLocationsClustersUsersService) Patch(name string, user *User) *ProjectsLocationsClustersUsersPatchCall { + c := &ProjectsLocationsClustersUsersPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + c.user = user + return c +} + +// AllowMissing sets the optional parameter "allowMissing": Allow +// missing fields in the update mask. +func (c *ProjectsLocationsClustersUsersPatchCall) AllowMissing(allowMissing bool) *ProjectsLocationsClustersUsersPatchCall { + c.urlParams_.Set("allowMissing", fmt.Sprint(allowMissing)) + return c +} + +// RequestId sets the optional parameter "requestId": An optional +// request ID to identify requests. Specify a unique request ID so that +// if you must retry your request, the server will know to ignore the +// request if it has already been completed. The server will guarantee +// that for at least 60 minutes since the first request. For example, +// consider a situation where you make an initial request and the +// request times out. If you make the request again with the same +// request ID, the server can check if original operation with the same +// request ID was received, and if so, will ignore the second request. +// This prevents clients from accidentally creating duplicate +// commitments. The request ID must be a valid UUID with the exception +// that zero UUID is not supported +// (00000000-0000-0000-0000-000000000000). +func (c *ProjectsLocationsClustersUsersPatchCall) RequestId(requestId string) *ProjectsLocationsClustersUsersPatchCall { + c.urlParams_.Set("requestId", requestId) + return c +} + +// UpdateMask sets the optional parameter "updateMask": Field mask is +// used to specify the fields to be overwritten in the User resource by +// the update. The fields specified in the update_mask are relative to +// the resource, not the full request. A field will be overwritten if it +// is in the mask. If the user does not provide a mask then all fields +// will be overwritten. +func (c *ProjectsLocationsClustersUsersPatchCall) UpdateMask(updateMask string) *ProjectsLocationsClustersUsersPatchCall { + c.urlParams_.Set("updateMask", updateMask) + return c +} + +// ValidateOnly sets the optional parameter "validateOnly": If set, the +// backend validates the request, but doesn't actually execute it. +func (c *ProjectsLocationsClustersUsersPatchCall) ValidateOnly(validateOnly bool) *ProjectsLocationsClustersUsersPatchCall { + 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 *ProjectsLocationsClustersUsersPatchCall) Fields(s ...googleapi.Field) *ProjectsLocationsClustersUsersPatchCall { + 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 *ProjectsLocationsClustersUsersPatchCall) Context(ctx context.Context) *ProjectsLocationsClustersUsersPatchCall { + 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 *ProjectsLocationsClustersUsersPatchCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsClustersUsersPatchCall) 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.user) + 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, "v1beta/{+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 "alloydb.projects.locations.clusters.users.patch" call. +// Exactly one of *User or error will be non-nil. Any non-2xx status +// code is an error. Response headers are in either +// *User.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 *ProjectsLocationsClustersUsersPatchCall) Do(opts ...googleapi.CallOption) (*User, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, gensupport.WrapError(&googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + }) + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, gensupport.WrapError(err) + } + ret := &User{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Updates the parameters of a single User.", + // "flatPath": "v1beta/projects/{projectsId}/locations/{locationsId}/clusters/{clustersId}/users/{usersId}", + // "httpMethod": "PATCH", + // "id": "alloydb.projects.locations.clusters.users.patch", + // "parameterOrder": [ + // "name" + // ], + // "parameters": { + // "allowMissing": { + // "description": "Optional. Allow missing fields in the update mask.", + // "location": "query", + // "type": "boolean" + // }, + // "name": { + // "description": "Output only. Name of the resource in the form of projects/{project}/locations/{location}/cluster/{cluster}/users/{user}.", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+/clusters/[^/]+/users/[^/]+$", + // "required": true, + // "type": "string" + // }, + // "requestId": { + // "description": "Optional. An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. The server will guarantee that for at least 60 minutes since the first request. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", + // "location": "query", + // "type": "string" + // }, + // "updateMask": { + // "description": "Optional. Field mask is used to specify the fields to be overwritten in the User resource by the update. The fields specified in the update_mask are relative to the resource, not the full request. A field will be overwritten if it is in the mask. If the user does not provide a mask then all fields will be overwritten.", + // "format": "google-fieldmask", + // "location": "query", + // "type": "string" + // }, + // "validateOnly": { + // "description": "Optional. If set, the backend validates the request, but doesn't actually execute it.", + // "location": "query", + // "type": "boolean" + // } + // }, + // "path": "v1beta/{+name}", + // "request": { + // "$ref": "User" + // }, + // "response": { + // "$ref": "User" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "alloydb.projects.locations.operations.cancel": + +type ProjectsLocationsOperationsCancelCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Cancel: Starts asynchronous cancellation on a long-running operation. +// The server makes a best effort to cancel the operation, but success +// is not guaranteed. If the server doesn't support this method, it +// returns `google.rpc.Code.UNIMPLEMENTED`. Clients can use +// Operations.GetOperation or other methods to check whether the +// cancellation succeeded or whether the operation completed despite +// cancellation. On successful cancellation, the operation is not +// deleted; instead, it becomes an operation with an Operation.error +// value with a google.rpc.Status.code of 1, corresponding to +// `Code.CANCELLED`. +// +// - name: The name of the operation resource to be cancelled. +func (r *ProjectsLocationsOperationsService) Cancel(name string) *ProjectsLocationsOperationsCancelCall { + c := &ProjectsLocationsOperationsCancelCall{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 *ProjectsLocationsOperationsCancelCall) Fields(s ...googleapi.Field) *ProjectsLocationsOperationsCancelCall { + 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 *ProjectsLocationsOperationsCancelCall) Context(ctx context.Context) *ProjectsLocationsOperationsCancelCall { + 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 *ProjectsLocationsOperationsCancelCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsOperationsCancelCall) 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, "v1beta/{+name}:cancel") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("POST", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "name": c.name, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "alloydb.projects.locations.operations.cancel" call. +// Exactly one of *Empty or error will be non-nil. Any non-2xx status +// code is an error. Response headers are in either +// *Empty.ServerResponse.Header or (if a response was returned at all) +// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to +// check whether the returned error was because http.StatusNotModified +// was returned. +func (c *ProjectsLocationsOperationsCancelCall) Do(opts ...googleapi.CallOption) (*Empty, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, gensupport.WrapError(&googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + }) + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, gensupport.WrapError(err) + } + ret := &Empty{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Starts asynchronous cancellation on a long-running operation. The server makes a best effort to cancel the operation, but success is not guaranteed. If the server doesn't support this method, it returns `google.rpc.Code.UNIMPLEMENTED`. Clients can use Operations.GetOperation or other methods to check whether the cancellation succeeded or whether the operation completed despite cancellation. On successful cancellation, the operation is not deleted; instead, it becomes an operation with an Operation.error value with a google.rpc.Status.code of 1, corresponding to `Code.CANCELLED`.", + // "flatPath": "v1beta/projects/{projectsId}/locations/{locationsId}/operations/{operationsId}:cancel", + // "httpMethod": "POST", + // "id": "alloydb.projects.locations.operations.cancel", + // "parameterOrder": [ + // "name" + // ], + // "parameters": { + // "name": { + // "description": "The name of the operation resource to be cancelled.", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+/operations/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1beta/{+name}:cancel", + // "response": { + // "$ref": "Empty" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "alloydb.projects.locations.operations.delete": + +type ProjectsLocationsOperationsDeleteCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Delete: Deletes a long-running operation. This method indicates that +// the client is no longer interested in the operation result. It does +// not cancel the operation. If the server doesn't support this method, +// it returns `google.rpc.Code.UNIMPLEMENTED`. +// +// - name: The name of the operation resource to be deleted. +func (r *ProjectsLocationsOperationsService) Delete(name string) *ProjectsLocationsOperationsDeleteCall { + c := &ProjectsLocationsOperationsDeleteCall{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 *ProjectsLocationsOperationsDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsOperationsDeleteCall { + 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 *ProjectsLocationsOperationsDeleteCall) Context(ctx context.Context) *ProjectsLocationsOperationsDeleteCall { + 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 *ProjectsLocationsOperationsDeleteCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsOperationsDeleteCall) 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, "v1beta/{+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 "alloydb.projects.locations.operations.delete" call. +// Exactly one of *Empty or error will be non-nil. Any non-2xx status +// code is an error. Response headers are in either +// *Empty.ServerResponse.Header or (if a response was returned at all) +// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to +// check whether the returned error was because http.StatusNotModified +// was returned. +func (c *ProjectsLocationsOperationsDeleteCall) Do(opts ...googleapi.CallOption) (*Empty, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, gensupport.WrapError(&googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + }) + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, gensupport.WrapError(err) + } + ret := &Empty{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Deletes a long-running operation. This method indicates that the client is no longer interested in the operation result. It does not cancel the operation. If the server doesn't support this method, it returns `google.rpc.Code.UNIMPLEMENTED`.", + // "flatPath": "v1beta/projects/{projectsId}/locations/{locationsId}/operations/{operationsId}", + // "httpMethod": "DELETE", + // "id": "alloydb.projects.locations.operations.delete", + // "parameterOrder": [ + // "name" + // ], + // "parameters": { + // "name": { + // "description": "The name of the operation resource to be deleted.", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+/operations/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1beta/{+name}", + // "response": { + // "$ref": "Empty" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "alloydb.projects.locations.operations.get": + +type ProjectsLocationsOperationsGetCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// Get: Gets the latest state of a long-running operation. Clients can +// use this method to poll the operation result at intervals as +// recommended by the API service. +// +// - name: The name of the operation resource. +func (r *ProjectsLocationsOperationsService) Get(name string) *ProjectsLocationsOperationsGetCall { + c := &ProjectsLocationsOperationsGetCall{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 *ProjectsLocationsOperationsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsOperationsGetCall { + 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 *ProjectsLocationsOperationsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsOperationsGetCall { + 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 *ProjectsLocationsOperationsGetCall) Context(ctx context.Context) *ProjectsLocationsOperationsGetCall { + 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 *ProjectsLocationsOperationsGetCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsOperationsGetCall) 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, "v1beta/{+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 "alloydb.projects.locations.operations.get" call. +// Exactly one of *Operation or error will be non-nil. Any non-2xx +// status code is an error. Response headers are in either +// *Operation.ServerResponse.Header or (if a response was returned at +// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified +// to check whether the returned error was because +// http.StatusNotModified was returned. +func (c *ProjectsLocationsOperationsGetCall) Do(opts ...googleapi.CallOption) (*Operation, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, gensupport.WrapError(&googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + }) + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, gensupport.WrapError(err) + } + ret := &Operation{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Gets the latest state of a long-running operation. Clients can use this method to poll the operation result at intervals as recommended by the API service.", + // "flatPath": "v1beta/projects/{projectsId}/locations/{locationsId}/operations/{operationsId}", + // "httpMethod": "GET", + // "id": "alloydb.projects.locations.operations.get", + // "parameterOrder": [ + // "name" + // ], + // "parameters": { + // "name": { + // "description": "The name of the operation resource.", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+/operations/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1beta/{+name}", + // "response": { + // "$ref": "Operation" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "alloydb.projects.locations.operations.list": + +type ProjectsLocationsOperationsListCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// List: Lists operations that match the specified filter in the +// request. If the server doesn't support this method, it returns +// `UNIMPLEMENTED`. +// +// - name: The name of the operation's parent resource. +func (r *ProjectsLocationsOperationsService) List(name string) *ProjectsLocationsOperationsListCall { + c := &ProjectsLocationsOperationsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + return c +} + +// Filter sets the optional parameter "filter": The standard list +// filter. +func (c *ProjectsLocationsOperationsListCall) Filter(filter string) *ProjectsLocationsOperationsListCall { + c.urlParams_.Set("filter", filter) + return c +} + +// PageSize sets the optional parameter "pageSize": The standard list +// page size. +func (c *ProjectsLocationsOperationsListCall) PageSize(pageSize int64) *ProjectsLocationsOperationsListCall { + c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) + return c +} + +// PageToken sets the optional parameter "pageToken": The standard list +// page token. +func (c *ProjectsLocationsOperationsListCall) PageToken(pageToken string) *ProjectsLocationsOperationsListCall { + 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 *ProjectsLocationsOperationsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsOperationsListCall { + 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 *ProjectsLocationsOperationsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsOperationsListCall { + 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 *ProjectsLocationsOperationsListCall) Context(ctx context.Context) *ProjectsLocationsOperationsListCall { + 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 *ProjectsLocationsOperationsListCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsOperationsListCall) 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, "v1beta/{+name}/operations") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("GET", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "name": c.name, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "alloydb.projects.locations.operations.list" call. +// Exactly one of *ListOperationsResponse or error will be non-nil. Any +// non-2xx status code is an error. Response headers are in either +// *ListOperationsResponse.ServerResponse.Header or (if a response was +// returned at all) in error.(*googleapi.Error).Header. Use +// googleapi.IsNotModified to check whether the returned error was +// because http.StatusNotModified was returned. +func (c *ProjectsLocationsOperationsListCall) Do(opts ...googleapi.CallOption) (*ListOperationsResponse, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, gensupport.WrapError(&googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + }) + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, gensupport.WrapError(err) + } + ret := &ListOperationsResponse{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Lists operations that match the specified filter in the request. If the server doesn't support this method, it returns `UNIMPLEMENTED`.", + // "flatPath": "v1beta/projects/{projectsId}/locations/{locationsId}/operations", + // "httpMethod": "GET", + // "id": "alloydb.projects.locations.operations.list", + // "parameterOrder": [ + // "name" + // ], + // "parameters": { + // "filter": { + // "description": "The standard list filter.", + // "location": "query", + // "type": "string" + // }, + // "name": { + // "description": "The name of the operation's parent resource.", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+$", + // "required": true, + // "type": "string" + // }, + // "pageSize": { + // "description": "The standard list page size.", + // "format": "int32", + // "location": "query", + // "type": "integer" + // }, + // "pageToken": { + // "description": "The standard list page token.", + // "location": "query", + // "type": "string" + // } + // }, + // "path": "v1beta/{+name}/operations", + // "response": { + // "$ref": "ListOperationsResponse" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// Pages invokes f for each page of results. +// A non-nil error returned from f will halt the iteration. +// The provided context supersedes any context provided to the Context method. +func (c *ProjectsLocationsOperationsListCall) Pages(ctx context.Context, f func(*ListOperationsResponse) error) error { + c.ctx_ = ctx + defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point + for { + x, err := c.Do() + if err != nil { + return err + } + if err := f(x); err != nil { + return err + } + if x.NextPageToken == "" { + return nil + } + c.PageToken(x.NextPageToken) + } +} + +// method id "alloydb.projects.locations.supportedDatabaseFlags.list": + +type ProjectsLocationsSupportedDatabaseFlagsListCall struct { + s *Service + parent string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// List: Lists SupportedDatabaseFlags for a given project and location. +// +// - parent: The name of the parent resource. The required format is: * +// projects/{project}/locations/{location} Regardless of the parent +// specified here, as long it is contains a valid project and +// location, the service will return a static list of supported flags +// resources. Note that we do not yet support region-specific flags. +func (r *ProjectsLocationsSupportedDatabaseFlagsService) List(parent string) *ProjectsLocationsSupportedDatabaseFlagsListCall { + c := &ProjectsLocationsSupportedDatabaseFlagsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + return c +} + +// PageSize sets the optional parameter "pageSize": Requested page size. +// Server may return fewer items than requested. If unspecified, server +// will pick an appropriate default. +func (c *ProjectsLocationsSupportedDatabaseFlagsListCall) PageSize(pageSize int64) *ProjectsLocationsSupportedDatabaseFlagsListCall { + c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) + return c +} + +// PageToken sets the optional parameter "pageToken": A token +// identifying a page of results the server should return. +func (c *ProjectsLocationsSupportedDatabaseFlagsListCall) PageToken(pageToken string) *ProjectsLocationsSupportedDatabaseFlagsListCall { + 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 *ProjectsLocationsSupportedDatabaseFlagsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsSupportedDatabaseFlagsListCall { + 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 *ProjectsLocationsSupportedDatabaseFlagsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsSupportedDatabaseFlagsListCall { + 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 *ProjectsLocationsSupportedDatabaseFlagsListCall) Context(ctx context.Context) *ProjectsLocationsSupportedDatabaseFlagsListCall { + 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 *ProjectsLocationsSupportedDatabaseFlagsListCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsSupportedDatabaseFlagsListCall) 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, "v1beta/{+parent}/supportedDatabaseFlags") + 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 "alloydb.projects.locations.supportedDatabaseFlags.list" call. +// Exactly one of *ListSupportedDatabaseFlagsResponse or error will be +// non-nil. Any non-2xx status code is an error. Response headers are in +// either *ListSupportedDatabaseFlagsResponse.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 *ProjectsLocationsSupportedDatabaseFlagsListCall) Do(opts ...googleapi.CallOption) (*ListSupportedDatabaseFlagsResponse, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, gensupport.WrapError(&googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + }) + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, gensupport.WrapError(err) + } + ret := &ListSupportedDatabaseFlagsResponse{ + 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 SupportedDatabaseFlags for a given project and location.", + // "flatPath": "v1beta/projects/{projectsId}/locations/{locationsId}/supportedDatabaseFlags", + // "httpMethod": "GET", + // "id": "alloydb.projects.locations.supportedDatabaseFlags.list", + // "parameterOrder": [ + // "parent" + // ], + // "parameters": { + // "pageSize": { + // "description": "Requested page size. Server may return fewer items than requested. If unspecified, server will pick an appropriate default.", + // "format": "int32", + // "location": "query", + // "type": "integer" + // }, + // "pageToken": { + // "description": "A token identifying a page of results the server should return.", + // "location": "query", + // "type": "string" + // }, + // "parent": { + // "description": "Required. The name of the parent resource. The required format is: * projects/{project}/locations/{location} Regardless of the parent specified here, as long it is contains a valid project and location, the service will return a static list of supported flags resources. Note that we do not yet support region-specific flags.", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1beta/{+parent}/supportedDatabaseFlags", + // "response": { + // "$ref": "ListSupportedDatabaseFlagsResponse" + // }, + // "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 *ProjectsLocationsSupportedDatabaseFlagsListCall) Pages(ctx context.Context, f func(*ListSupportedDatabaseFlagsResponse) 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) + } +} diff --git a/analyticsadmin/v1alpha/analyticsadmin-api.json b/analyticsadmin/v1alpha/analyticsadmin-api.json index fbf6e42e029..65f6e5c77f4 100644 --- a/analyticsadmin/v1alpha/analyticsadmin-api.json +++ b/analyticsadmin/v1alpha/analyticsadmin-api.json @@ -3309,7 +3309,7 @@ "type": "string" }, "parent": { - "description": "Required. Format: properties/{property_id}/dataStreams/{dataStream}/sKAdNetworkConversionValueSchema Example: properties/1234/dataStreams/5678/sKAdNetworkConversionValueSchema", + "description": "Required. The DataStream resource to list schemas for. Format: properties/{property_id}/dataStreams/{dataStream} Example: properties/1234/dataStreams/5678", "location": "path", "pattern": "^properties/[^/]+/dataStreams/[^/]+$", "required": true, @@ -4524,7 +4524,7 @@ } } }, - "revision": "20230917", + "revision": "20230923", "rootUrl": "https://analyticsadmin.googleapis.com/", "schemas": { "GoogleAnalyticsAdminV1alphaAccessBetweenFilter": { diff --git a/analyticsadmin/v1alpha/analyticsadmin-gen.go b/analyticsadmin/v1alpha/analyticsadmin-gen.go index e2bc63c9944..87afe124d3a 100644 --- a/analyticsadmin/v1alpha/analyticsadmin-gen.go +++ b/analyticsadmin/v1alpha/analyticsadmin-gen.go @@ -24097,10 +24097,9 @@ type PropertiesDataStreamsSKAdNetworkConversionValueSchemaListCall struct { // List: Lists SKAdNetworkConversionValueSchema on a stream. Properties // can have at most one SKAdNetworkConversionValueSchema. // -// - parent: Format: -// properties/{property_id}/dataStreams/{dataStream}/sKAdNetworkConvers -// ionValueSchema Example: -// properties/1234/dataStreams/5678/sKAdNetworkConversionValueSchema. +// - parent: The DataStream resource to list schemas for. Format: +// properties/{property_id}/dataStreams/{dataStream} Example: +// properties/1234/dataStreams/5678. func (r *PropertiesDataStreamsSKAdNetworkConversionValueSchemaService) List(parent string) *PropertiesDataStreamsSKAdNetworkConversionValueSchemaListCall { c := &PropertiesDataStreamsSKAdNetworkConversionValueSchemaListCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.parent = parent @@ -24250,7 +24249,7 @@ func (c *PropertiesDataStreamsSKAdNetworkConversionValueSchemaListCall) Do(opts // "type": "string" // }, // "parent": { - // "description": "Required. Format: properties/{property_id}/dataStreams/{dataStream}/sKAdNetworkConversionValueSchema Example: properties/1234/dataStreams/5678/sKAdNetworkConversionValueSchema", + // "description": "Required. The DataStream resource to list schemas for. Format: properties/{property_id}/dataStreams/{dataStream} Example: properties/1234/dataStreams/5678", // "location": "path", // "pattern": "^properties/[^/]+/dataStreams/[^/]+$", // "required": true, diff --git a/api-list.json b/api-list.json index 9c4850ef876..7855f6f5fa3 100644 --- a/api-list.json +++ b/api-list.json @@ -287,6 +287,51 @@ "documentationLink": "https://developers.google.com/admin-sdk/alertcenter/", "preferred": true }, + { + "kind": "discovery#directoryItem", + "id": "alloydb:v1alpha", + "name": "alloydb", + "version": "v1alpha", + "title": "AlloyDB API", + "description": "AlloyDB for PostgreSQL is an open source-compatible database service that provides a powerful option for migrating, modernizing, or building commercial-grade applications. It offers full compatibility with standard PostgreSQL, and is more than 4x faster for transactional workloads and up to 100x faster for analytical queries than standard PostgreSQL in our performance tests. AlloyDB for PostgreSQL offers a 99.99 percent availability SLA inclusive of maintenance. AlloyDB is optimized for the most demanding use cases, allowing you to build new applications that require high transaction throughput, large database sizes, or multiple read resources; scale existing PostgreSQL workloads with no application changes; and modernize legacy proprietary databases.", + "discoveryRestUrl": "https://alloydb.googleapis.com/$discovery/rest?version=v1alpha", + "icons": { + "x16": "https://www.gstatic.com/images/branding/product/1x/googleg_16dp.png", + "x32": "https://www.gstatic.com/images/branding/product/1x/googleg_32dp.png" + }, + "documentationLink": "https://cloud.google.com/alloydb/", + "preferred": false + }, + { + "kind": "discovery#directoryItem", + "id": "alloydb:v1beta", + "name": "alloydb", + "version": "v1beta", + "title": "AlloyDB API", + "description": "AlloyDB for PostgreSQL is an open source-compatible database service that provides a powerful option for migrating, modernizing, or building commercial-grade applications. It offers full compatibility with standard PostgreSQL, and is more than 4x faster for transactional workloads and up to 100x faster for analytical queries than standard PostgreSQL in our performance tests. AlloyDB for PostgreSQL offers a 99.99 percent availability SLA inclusive of maintenance. AlloyDB is optimized for the most demanding use cases, allowing you to build new applications that require high transaction throughput, large database sizes, or multiple read resources; scale existing PostgreSQL workloads with no application changes; and modernize legacy proprietary databases.", + "discoveryRestUrl": "https://alloydb.googleapis.com/$discovery/rest?version=v1beta", + "icons": { + "x16": "https://www.gstatic.com/images/branding/product/1x/googleg_16dp.png", + "x32": "https://www.gstatic.com/images/branding/product/1x/googleg_32dp.png" + }, + "documentationLink": "https://cloud.google.com/alloydb/", + "preferred": false + }, + { + "kind": "discovery#directoryItem", + "id": "alloydb:v1", + "name": "alloydb", + "version": "v1", + "title": "AlloyDB API", + "description": "AlloyDB for PostgreSQL is an open source-compatible database service that provides a powerful option for migrating, modernizing, or building commercial-grade applications. It offers full compatibility with standard PostgreSQL, and is more than 4x faster for transactional workloads and up to 100x faster for analytical queries than standard PostgreSQL in our performance tests. AlloyDB for PostgreSQL offers a 99.99 percent availability SLA inclusive of maintenance. AlloyDB is optimized for the most demanding use cases, allowing you to build new applications that require high transaction throughput, large database sizes, or multiple read resources; scale existing PostgreSQL workloads with no application changes; and modernize legacy proprietary databases.", + "discoveryRestUrl": "https://alloydb.googleapis.com/$discovery/rest?version=v1", + "icons": { + "x16": "https://www.gstatic.com/images/branding/product/1x/googleg_16dp.png", + "x32": "https://www.gstatic.com/images/branding/product/1x/googleg_32dp.png" + }, + "documentationLink": "https://cloud.google.com/alloydb/", + "preferred": true + }, { "kind": "discovery#directoryItem", "id": "analytics:v3", diff --git a/apigeeregistry/v1/apigeeregistry-gen.go b/apigeeregistry/v1/apigeeregistry-gen.go index cb89897b178..5a2bf002682 100644 --- a/apigeeregistry/v1/apigeeregistry-gen.go +++ b/apigeeregistry/v1/apigeeregistry-gen.go @@ -8,6 +8,17 @@ // // For product documentation, see: https://cloud.google.com/apigee/docs/api-hub/what-is-api-hub // +// # Library status +// +// These client libraries are officially supported by Google. However, this +// library is considered complete and is in maintenance mode. This means +// that we will address critical bugs and security issues but will not add +// any new features. +// +// When possible, we recommend using our newer +// [Cloud Client Libraries for Go](https://pkg.go.dev/cloud.google.com/go) +// that are still actively being worked and iterated on. +// // # Creating a client // // Usage example: @@ -17,24 +28,26 @@ // ctx := context.Background() // apigeeregistryService, err := apigeeregistry.NewService(ctx) // -// In this example, Google Application Default Credentials are used for authentication. -// -// For information on how to create and obtain Application Default Credentials, see https://developers.google.com/identity/protocols/application-default-credentials. +// In this example, Google Application Default Credentials are used for +// authentication. For information on how to create and obtain Application +// Default Credentials, see https://developers.google.com/identity/protocols/application-default-credentials. // // # Other authentication options // -// To use an API key for authentication (note: some APIs do not support API keys), use option.WithAPIKey: +// To use an API key for authentication (note: some APIs do not support API +// keys), use [google.golang.org/api/option.WithAPIKey]: // // apigeeregistryService, err := apigeeregistry.NewService(ctx, option.WithAPIKey("AIza...")) // -// To use an OAuth token (e.g., a user token obtained via a three-legged OAuth flow), use option.WithTokenSource: +// To use an OAuth token (e.g., a user token obtained via a three-legged OAuth +// flow, use [google.golang.org/api/option.WithTokenSource]: // // config := &oauth2.Config{...} // // ... // token, err := config.Exchange(ctx, ...) // apigeeregistryService, err := apigeeregistry.NewService(ctx, option.WithTokenSource(config.TokenSource(ctx, token))) // -// See https://godoc.org/google.golang.org/api/option/ for details on options. +// See [google.golang.org/api/option.ClientOption] for details on options. package apigeeregistry // import "google.golang.org/api/apigeeregistry/v1" import ( diff --git a/blockchainnodeengine/v1/blockchainnodeengine-api.json b/blockchainnodeengine/v1/blockchainnodeengine-api.json index f893d091e7b..33cd32b8139 100644 --- a/blockchainnodeengine/v1/blockchainnodeengine-api.json +++ b/blockchainnodeengine/v1/blockchainnodeengine-api.json @@ -487,7 +487,7 @@ } } }, - "revision": "20230914", + "revision": "20230920", "rootUrl": "https://blockchainnodeengine.googleapis.com/", "schemas": { "BlockchainNode": { @@ -624,6 +624,10 @@ "description": "Immutable. Enables JSON-RPC access to functions in the `debug` namespace. Defaults to `false`.", "type": "boolean" }, + "beaconFeeRecipient": { + "description": "An Ethereum address which the beacon client will send fee rewards to if no recipient is configured in the validator client. See https://lighthouse-book.sigmaprime.io/suggested-fee-recipient.html or https://docs.prylabs.network/docs/execution-node/fee-recipient for examples of how this is used. Note that while this is often described as \"suggested\", as we run the execution node we can trust the execution node, and therefore this is considered enforced.", + "type": "string" + }, "consensusClient": { "description": "Immutable. The consensus client.", "enum": [ diff --git a/blockchainnodeengine/v1/blockchainnodeengine-gen.go b/blockchainnodeengine/v1/blockchainnodeengine-gen.go index a9f4b6fdfcf..8ed39aa4a40 100644 --- a/blockchainnodeengine/v1/blockchainnodeengine-gen.go +++ b/blockchainnodeengine/v1/blockchainnodeengine-gen.go @@ -362,6 +362,16 @@ type EthereumDetails struct { // the `debug` namespace. Defaults to `false`. ApiEnableDebug bool `json:"apiEnableDebug,omitempty"` + // BeaconFeeRecipient: An Ethereum address which the beacon client will + // send fee rewards to if no recipient is configured in the validator + // client. See + // https://lighthouse-book.sigmaprime.io/suggested-fee-recipient.html or + // https://docs.prylabs.network/docs/execution-node/fee-recipient for + // examples of how this is used. Note that while this is often described + // as "suggested", as we run the execution node we can trust the + // execution node, and therefore this is considered enforced. + BeaconFeeRecipient string `json:"beaconFeeRecipient,omitempty"` + // ConsensusClient: Immutable. The consensus client. // // Possible values: diff --git a/chat/v1/chat-api.json b/chat/v1/chat-api.json index 065ddfa66cb..2199a957c6e 100644 --- a/chat/v1/chat-api.json +++ b/chat/v1/chat-api.json @@ -304,7 +304,7 @@ ] }, "get": { - "description": "Returns details about a space. For an example, see [Get a space](https://developers.google.com/chat/api/guides/v1/spaces/get). Requires [authentication](https://developers.google.com/chat/api/guides/auth). Fully supports [service account authentication](https://developers.google.com/chat/api/guides/auth/service-accounts) and [user authentication](https://developers.google.com/chat/api/guides/auth/users). [User authentication](https://developers.google.com/chat/api/guides/auth/users).", + "description": "Returns details about a space. For an example, see [Get a space](https://developers.google.com/chat/api/guides/v1/spaces/get). Requires [authentication](https://developers.google.com/chat/api/guides/auth). Fully supports [service account authentication](https://developers.google.com/chat/api/guides/auth/service-accounts) and [user authentication](https://developers.google.com/chat/api/guides/auth/users).", "flatPath": "v1/spaces/{spacesId}", "httpMethod": "GET", "id": "chat.spaces.get", @@ -474,6 +474,7 @@ "$ref": "Membership" }, "scopes": [ + "https://www.googleapis.com/auth/chat.import", "https://www.googleapis.com/auth/chat.memberships", "https://www.googleapis.com/auth/chat.memberships.app" ] @@ -549,6 +550,7 @@ }, "scopes": [ "https://www.googleapis.com/auth/chat.bot", + "https://www.googleapis.com/auth/chat.import", "https://www.googleapis.com/auth/chat.memberships", "https://www.googleapis.com/auth/chat.memberships.readonly" ] @@ -955,7 +957,7 @@ } } }, - "revision": "20230914", + "revision": "20230921", "rootUrl": "https://chat.googleapis.com/", "schemas": { "ActionParameter": { @@ -1062,7 +1064,7 @@ "type": "object" }, "Annotation": { - "description": "Output only. Annotations associated with the plain-text body of the message. To add basic formatting to a text message, see [Format text messages](https://developers.google.com/chat/api/guides/message-formats/text#format-texts). Example plain-text message body: ``` Hello @FooBot how are you!\" ``` The corresponding annotations metadata: ``` \"annotations\":[{ \"type\":\"USER_MENTION\", \"startIndex\":6, \"length\":7, \"userMention\": { \"user\": { \"name\":\"users/{user}\", \"displayName\":\"FooBot\", \"avatarUrl\":\"https://goo.gl/aeDtrS\", \"type\":\"BOT\" }, \"type\":\"MENTION\" } }] ```", + "description": "Output only. Annotations associated with the plain-text body of the message. To add basic formatting to a text message, see [Format text messages](https://developers.google.com/chat/format-messages). Example plain-text message body: ``` Hello @FooBot how are you!\" ``` The corresponding annotations metadata: ``` \"annotations\":[{ \"type\":\"USER_MENTION\", \"startIndex\":6, \"length\":7, \"userMention\": { \"user\": { \"name\":\"users/{user}\", \"displayName\":\"FooBot\", \"avatarUrl\":\"https://goo.gl/aeDtrS\", \"type\":\"BOT\" }, \"type\":\"MENTION\" } }] ```", "id": "Annotation", "properties": { "length": { @@ -2067,7 +2069,7 @@ }, "endIcon": { "$ref": "GoogleAppsCardV1Icon", - "description": "An icon displayed after the text. Supports [built-in](https://developers.google.com/chat/api/guides/message-formats/cards#builtinicons) and [custom](https://developers.google.com/chat/api/guides/message-formats/cards#customicons) icons." + "description": "An icon displayed after the text. Supports [built-in](https://developers.google.com/chat/format-messages#builtinicons) and [custom](https://developers.google.com/chat/format-messages#customicons) icons." }, "icon": { "$ref": "GoogleAppsCardV1Icon", @@ -2176,7 +2178,7 @@ "type": "object" }, "GoogleAppsCardV1Icon": { - "description": "An icon displayed in a widget on a card. For an example in Google Chat apps, see [Icon](https://developers.google.com/chat/ui/widgets/icon). Supports [built-in](https://developers.google.com/chat/api/guides/message-formats/cards#builtinicons) and [custom](https://developers.google.com/chat/api/guides/message-formats/cards#customicons) icons.", + "description": "An icon displayed in a widget on a card. For an example in Google Chat apps, see [Icon](https://developers.google.com/chat/ui/widgets/icon). Supports [built-in](https://developers.google.com/chat/format-messages#builtinicons) and [custom](https://developers.google.com/chat/format-messages#customicons) icons.", "id": "GoogleAppsCardV1Icon", "properties": { "altText": { @@ -2200,7 +2202,7 @@ "type": "string" }, "knownIcon": { - "description": "Display one of the built-in icons provided by Google Workspace. For example, to display an airplane icon, specify `AIRPLANE`. For a bus, specify `BUS`. For a full list of supported icons, see [built-in icons](https://developers.google.com/chat/api/guides/message-formats/cards#builtinicons).", + "description": "Display one of the built-in icons provided by Google Workspace. For example, to display an airplane icon, specify `AIRPLANE`. For a bus, specify `BUS`. For a full list of supported icons, see [built-in icons](https://developers.google.com/chat/format-messages#builtinicons).", "type": "string" } }, @@ -3055,7 +3057,7 @@ "type": "string" }, "role": { - "description": "Output only. User's role within a Chat space, which determines their permitted actions in the space.", + "description": "Optional. User's role within a Chat space, which determines their permitted actions in the space. [Developer Preview](https://developers.google.com/workspace/preview): This field can only be used as input in `UpdateMembership`.", "enum": [ "MEMBERSHIP_ROLE_UNSPECIFIED", "ROLE_MEMBER", @@ -3066,7 +3068,6 @@ "A member of the space. The user has basic permissions, like sending messages to the space. In 1:1 and unnamed group conversations, everyone has this role.", "A space manager. The user has all basic permissions plus administrative permissions that let them manage the space, like adding or removing members. Only supported in SpaceType.SPACE." ], - "readOnly": true, "type": "string" }, "state": { @@ -3172,6 +3173,11 @@ "description": "A plain-text description of the message's cards, used when the actual cards can't be displayed—for example, mobile notifications.", "type": "string" }, + "formattedText": { + "description": "Output only. Contains the message `text` with markups added to communicate formatting. This field might not capture all formatting visible in the UI, but includes the following: * [Markup syntax](https://developers.google.com/chat/format-messages) for bold, italic, strikethrough, monospace, and monospace block. * [User mentions](https://developers.google.com/chat/format-messages#messages-@mention) using the format ``. * Custom hyperlinks using the format `\u003c{url}|{rendered_text}\u003e` where the first string is the URL and the second is the rendered text—for example, ``. * Custom emoji using the format `:{emoji_name}:`—for example, `:smile:`. This doesn't apply to Unicode emoji, such as `U+1F600` for a grinning face emoji. For more information, see [View text formatting sent in a message](https://developers.google.com/chat/format-messages#view_text_formatting_sent_in_a_message)", + "readOnly": true, + "type": "string" + }, "lastUpdateTime": { "description": "Output only. The time at which the message was last edited by a user. If the message has never been edited, this field is empty.", "format": "google-datetime", @@ -3207,7 +3213,7 @@ "description": "If your Chat app [authenticates as a user](https://developers.google.com/chat/api/guides/auth/users), the output populates the [space](https://developers.google.com/chat/api/reference/rest/v1/spaces) `name`." }, "text": { - "description": "Plain-text body of the message. The first link to an image, video, or web page generates a [preview chip](https://developers.google.com/chat/how-tos/preview-links). You can also [@mention a Google Chat user](https://developers.google.com/chat/api/guides/message-formats/text#messages-@mention), or everyone in the space. To learn about creating text messages, see [Create a text message](https://developers.google.com/chat/api/guides/message-formats/text).", + "description": "Plain-text body of the message. The first link to an image, video, or web page generates a [preview chip](https://developers.google.com/chat/how-tos/preview-links). You can also [@mention a Google Chat user](https://developers.google.com/chat/format-messages#messages-@mention), or everyone in the space. To learn about creating text messages, see [Create a text message](https://developers.google.com/chat/api/guides/message-formats/text).", "type": "string" }, "thread": { diff --git a/chat/v1/chat-gen.go b/chat/v1/chat-gen.go index 31c71954a16..6036949ead1 100644 --- a/chat/v1/chat-gen.go +++ b/chat/v1/chat-gen.go @@ -497,9 +497,9 @@ func (s *ActionStatus) MarshalJSON() ([]byte, error) { // Annotation: Output only. Annotations associated with the plain-text // body of the message. To add basic formatting to a text message, see // Format text messages -// (https://developers.google.com/chat/api/guides/message-formats/text#format-texts). -// Example plain-text message body: ``` Hello @FooBot how are you!" ``` -// The corresponding annotations metadata: ``` "annotations":[{ +// (https://developers.google.com/chat/format-messages). Example +// plain-text message body: ``` Hello @FooBot how are you!" ``` The +// corresponding annotations metadata: ``` "annotations":[{ // "type":"USER_MENTION", "startIndex":6, "length":7, "userMention": { // "user": { "name":"users/{user}", "displayName":"FooBot", // "avatarUrl":"https://goo.gl/aeDtrS", "type":"BOT" }, "type":"MENTION" @@ -2316,9 +2316,9 @@ type GoogleAppsCardV1DecoratedText struct { Button *GoogleAppsCardV1Button `json:"button,omitempty"` // EndIcon: An icon displayed after the text. Supports built-in - // (https://developers.google.com/chat/api/guides/message-formats/cards#builtinicons) - // and custom - // (https://developers.google.com/chat/api/guides/message-formats/cards#customicons) + // (https://developers.google.com/chat/format-messages#builtinicons) and + // custom + // (https://developers.google.com/chat/format-messages#customicons) // icons. EndIcon *GoogleAppsCardV1Icon `json:"endIcon,omitempty"` @@ -2494,9 +2494,9 @@ func (s *GoogleAppsCardV1GridItem) MarshalJSON() ([]byte, error) { // example in Google Chat apps, see Icon // (https://developers.google.com/chat/ui/widgets/icon). Supports // built-in -// (https://developers.google.com/chat/api/guides/message-formats/cards#builtinicons) -// and custom -// (https://developers.google.com/chat/api/guides/message-formats/cards#customicons) +// (https://developers.google.com/chat/format-messages#builtinicons) and +// custom +// (https://developers.google.com/chat/format-messages#customicons) // icons. type GoogleAppsCardV1Icon struct { // AltText: Optional. A description of the icon used for accessibility. @@ -2532,7 +2532,7 @@ type GoogleAppsCardV1Icon struct { // Workspace. For example, to display an airplane icon, specify // `AIRPLANE`. For a bus, specify `BUS`. For a full list of supported // icons, see built-in icons - // (https://developers.google.com/chat/api/guides/message-formats/cards#builtinicons). + // (https://developers.google.com/chat/format-messages#builtinicons). KnownIcon string `json:"knownIcon,omitempty"` // ForceSendFields is a list of field names (e.g. "AltText") to @@ -4025,8 +4025,10 @@ type Membership struct { // Format: `spaces/{space}/members/{member}` Name string `json:"name,omitempty"` - // Role: Output only. User's role within a Chat space, which determines - // their permitted actions in the space. + // Role: Optional. User's role within a Chat space, which determines + // their permitted actions in the space. Developer Preview + // (https://developers.google.com/workspace/preview): This field can + // only be used as input in `UpdateMembership`. // // Possible values: // "MEMBERSHIP_ROLE_UNSPECIFIED" - Default value. For users: they @@ -4160,6 +4162,22 @@ type Message struct { // notifications. FallbackText string `json:"fallbackText,omitempty"` + // FormattedText: Output only. Contains the message `text` with markups + // added to communicate formatting. This field might not capture all + // formatting visible in the UI, but includes the following: * Markup + // syntax (https://developers.google.com/chat/format-messages) for bold, + // italic, strikethrough, monospace, and monospace block. * User + // mentions + // (https://developers.google.com/chat/format-messages#messages-@mention) + // using the format ``. * Custom hyperlinks using the format + // `<{url}|{rendered_text}>` where the first string is the URL and the + // second is the rendered text—for example, ``. * Custom emoji using + // the format `:{emoji_name}:`—for example, `:smile:`. This doesn't + // apply to Unicode emoji, such as `U+1F600` for a grinning face emoji. + // For more information, see View text formatting sent in a message + // (https://developers.google.com/chat/format-messages#view_text_formatting_sent_in_a_message) + FormattedText string `json:"formattedText,omitempty"` + // LastUpdateTime: Output only. The time at which the message was last // edited by a user. If the message has never been edited, this field is // empty. @@ -4201,7 +4219,7 @@ type Message struct { // video, or web page generates a preview chip // (https://developers.google.com/chat/how-tos/preview-links). You can // also @mention a Google Chat user - // (https://developers.google.com/chat/api/guides/message-formats/text#messages-@mention), + // (https://developers.google.com/chat/format-messages#messages-@mention), // or everyone in the space. To learn about creating text messages, see // Create a text message // (https://developers.google.com/chat/api/guides/message-formats/text). @@ -6086,8 +6104,6 @@ type SpacesGetCall struct { // service account authentication // (https://developers.google.com/chat/api/guides/auth/service-accounts) // and user authentication -// (https://developers.google.com/chat/api/guides/auth/users). User -// authentication // (https://developers.google.com/chat/api/guides/auth/users). // // - name: Resource name of the space, in the form "spaces/*". Format: @@ -6197,7 +6213,7 @@ func (c *SpacesGetCall) Do(opts ...googleapi.CallOption) (*Space, error) { } return ret, nil // { - // "description": "Returns details about a space. For an example, see [Get a space](https://developers.google.com/chat/api/guides/v1/spaces/get). Requires [authentication](https://developers.google.com/chat/api/guides/auth). Fully supports [service account authentication](https://developers.google.com/chat/api/guides/auth/service-accounts) and [user authentication](https://developers.google.com/chat/api/guides/auth/users). [User authentication](https://developers.google.com/chat/api/guides/auth/users).", + // "description": "Returns details about a space. For an example, see [Get a space](https://developers.google.com/chat/api/guides/v1/spaces/get). Requires [authentication](https://developers.google.com/chat/api/guides/auth). Fully supports [service account authentication](https://developers.google.com/chat/api/guides/auth/service-accounts) and [user authentication](https://developers.google.com/chat/api/guides/auth/users).", // "flatPath": "v1/spaces/{spacesId}", // "httpMethod": "GET", // "id": "chat.spaces.get", @@ -7092,6 +7108,7 @@ func (c *SpacesMembersDeleteCall) Do(opts ...googleapi.CallOption) (*Membership, // "$ref": "Membership" // }, // "scopes": [ + // "https://www.googleapis.com/auth/chat.import", // "https://www.googleapis.com/auth/chat.memberships", // "https://www.googleapis.com/auth/chat.memberships.app" // ] @@ -7497,6 +7514,7 @@ func (c *SpacesMembersListCall) Do(opts ...googleapi.CallOption) (*ListMembershi // }, // "scopes": [ // "https://www.googleapis.com/auth/chat.bot", + // "https://www.googleapis.com/auth/chat.import", // "https://www.googleapis.com/auth/chat.memberships", // "https://www.googleapis.com/auth/chat.memberships.readonly" // ] diff --git a/clouddeploy/v1/clouddeploy-api.json b/clouddeploy/v1/clouddeploy-api.json index a10ae2f444d..d73851b12ff 100644 --- a/clouddeploy/v1/clouddeploy-api.json +++ b/clouddeploy/v1/clouddeploy-api.json @@ -1479,7 +1479,7 @@ } } }, - "revision": "20230904", + "revision": "20230913", "rootUrl": "https://clouddeploy.googleapis.com/", "schemas": { "AbandonReleaseRequest": { @@ -1610,6 +1610,118 @@ }, "type": "object" }, + "AutomationEvent": { + "description": "Payload proto for \"clouddeploy.googleapis.com/automation\" Platform Log event that describes the Automation related events.", + "id": "AutomationEvent", + "properties": { + "automation": { + "description": "The name of the `AutomationRun`.", + "type": "string" + }, + "message": { + "description": "Debug message for when there is an update on the AutomationRun. Provides further details about the resource creation or state change.", + "type": "string" + }, + "pipelineUid": { + "description": "Unique identifier of the `DeliveryPipeline`.", + "type": "string" + }, + "type": { + "description": "Type of this notification, e.g. for a Pub/Sub failure.", + "enum": [ + "TYPE_UNSPECIFIED", + "TYPE_PUBSUB_NOTIFICATION_FAILURE", + "TYPE_RESOURCE_STATE_CHANGE", + "TYPE_PROCESS_ABORTED", + "TYPE_RESTRICTION_VIOLATED", + "TYPE_RESOURCE_DELETED", + "TYPE_RENDER_STATUES_CHANGE" + ], + "enumDeprecated": [ + false, + false, + false, + false, + false, + false, + true + ], + "enumDescriptions": [ + "Type is unspecified.", + "A Pub/Sub notification failed to be sent.", + "Resource state changed.", + "A process aborted.", + "Restriction check failed.", + "Resource deleted.", + "Deprecated: This field is never used. Use release_render log type instead." + ], + "type": "string" + } + }, + "type": "object" + }, + "AutomationRunEvent": { + "description": "Payload proto for \"clouddeploy.googleapis.com/automation_run\" Platform Log event that describes the AutomationRun related events.", + "id": "AutomationRunEvent", + "properties": { + "automationId": { + "description": "Identifier of the `Automation`.", + "type": "string" + }, + "automationRun": { + "description": "The name of the `AutomationRun`.", + "type": "string" + }, + "destinationTargetId": { + "description": "ID of the `Target` to which the `AutomationRun` is created.", + "type": "string" + }, + "message": { + "description": "Debug message for when there is an update on the AutomationRun. Provides further details about the resource creation or state change.", + "type": "string" + }, + "pipelineUid": { + "description": "Unique identifier of the `DeliveryPipeline`.", + "type": "string" + }, + "ruleId": { + "description": "Identifier of the `Automation` rule.", + "type": "string" + }, + "type": { + "description": "Type of this notification, e.g. for a Pub/Sub failure.", + "enum": [ + "TYPE_UNSPECIFIED", + "TYPE_PUBSUB_NOTIFICATION_FAILURE", + "TYPE_RESOURCE_STATE_CHANGE", + "TYPE_PROCESS_ABORTED", + "TYPE_RESTRICTION_VIOLATED", + "TYPE_RESOURCE_DELETED", + "TYPE_RENDER_STATUES_CHANGE" + ], + "enumDeprecated": [ + false, + false, + false, + false, + false, + false, + true + ], + "enumDescriptions": [ + "Type is unspecified.", + "A Pub/Sub notification failed to be sent.", + "Resource state changed.", + "A process aborted.", + "Restriction check failed.", + "Resource deleted.", + "Deprecated: This field is never used. Use release_render log type instead." + ], + "type": "string" + } + }, + "type": "object" + }, "Binding": { "description": "Associates `members`, or principals, with a `role`.", "id": "Binding", diff --git a/clouddeploy/v1/clouddeploy-gen.go b/clouddeploy/v1/clouddeploy-gen.go index d1e87dcfe51..3f659215f85 100644 --- a/clouddeploy/v1/clouddeploy-gen.go +++ b/clouddeploy/v1/clouddeploy-gen.go @@ -492,6 +492,120 @@ func (s *AuditLogConfig) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// AutomationEvent: Payload proto for +// "clouddeploy.googleapis.com/automation" Platform Log event that +// describes the Automation related events. +type AutomationEvent struct { + // Automation: The name of the `AutomationRun`. + Automation string `json:"automation,omitempty"` + + // Message: Debug message for when there is an update on the + // AutomationRun. Provides further details about the resource creation + // or state change. + Message string `json:"message,omitempty"` + + // PipelineUid: Unique identifier of the `DeliveryPipeline`. + PipelineUid string `json:"pipelineUid,omitempty"` + + // Type: Type of this notification, e.g. for a Pub/Sub failure. + // + // Possible values: + // "TYPE_UNSPECIFIED" - Type is unspecified. + // "TYPE_PUBSUB_NOTIFICATION_FAILURE" - A Pub/Sub notification failed + // to be sent. + // "TYPE_RESOURCE_STATE_CHANGE" - Resource state changed. + // "TYPE_PROCESS_ABORTED" - A process aborted. + // "TYPE_RESTRICTION_VIOLATED" - Restriction check failed. + // "TYPE_RESOURCE_DELETED" - Resource deleted. + // "TYPE_RENDER_STATUES_CHANGE" - Deprecated: This field is never + // used. Use release_render log type instead. + Type string `json:"type,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Automation") 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. "Automation") 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 *AutomationEvent) MarshalJSON() ([]byte, error) { + type NoMethod AutomationEvent + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// AutomationRunEvent: Payload proto for +// "clouddeploy.googleapis.com/automation_run" Platform Log event that +// describes the AutomationRun related events. +type AutomationRunEvent struct { + // AutomationId: Identifier of the `Automation`. + AutomationId string `json:"automationId,omitempty"` + + // AutomationRun: The name of the `AutomationRun`. + AutomationRun string `json:"automationRun,omitempty"` + + // DestinationTargetId: ID of the `Target` to which the `AutomationRun` + // is created. + DestinationTargetId string `json:"destinationTargetId,omitempty"` + + // Message: Debug message for when there is an update on the + // AutomationRun. Provides further details about the resource creation + // or state change. + Message string `json:"message,omitempty"` + + // PipelineUid: Unique identifier of the `DeliveryPipeline`. + PipelineUid string `json:"pipelineUid,omitempty"` + + // RuleId: Identifier of the `Automation` rule. + RuleId string `json:"ruleId,omitempty"` + + // Type: Type of this notification, e.g. for a Pub/Sub failure. + // + // Possible values: + // "TYPE_UNSPECIFIED" - Type is unspecified. + // "TYPE_PUBSUB_NOTIFICATION_FAILURE" - A Pub/Sub notification failed + // to be sent. + // "TYPE_RESOURCE_STATE_CHANGE" - Resource state changed. + // "TYPE_PROCESS_ABORTED" - A process aborted. + // "TYPE_RESTRICTION_VIOLATED" - Restriction check failed. + // "TYPE_RESOURCE_DELETED" - Resource deleted. + // "TYPE_RENDER_STATUES_CHANGE" - Deprecated: This field is never + // used. Use release_render log type instead. + Type string `json:"type,omitempty"` + + // ForceSendFields is a list of field names (e.g. "AutomationId") 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. "AutomationId") 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 *AutomationRunEvent) MarshalJSON() ([]byte, error) { + type NoMethod AutomationRunEvent + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // Binding: Associates `members`, or principals, with a `role`. type Binding struct { // Condition: The condition that is associated with this binding. If the diff --git a/connectors/v1/connectors-api.json b/connectors/v1/connectors-api.json index 1bb66539864..0ec75dc9999 100644 --- a/connectors/v1/connectors-api.json +++ b/connectors/v1/connectors-api.json @@ -1773,7 +1773,7 @@ } } }, - "revision": "20230906", + "revision": "20230913", "rootUrl": "https://connectors.googleapis.com/", "schemas": { "AuditConfig": { @@ -3050,14 +3050,14 @@ "description": "Enrichment Enabled.", "type": "boolean" }, + "eventsListenerIngressEndpoint": { + "description": "Optional. Ingress endpoint of the event listener. This is used only when private connectivity is enabled.", + "type": "string" + }, "privateConnectivityEnabled": { "description": "Optional. Private Connectivity Enabled.", "type": "boolean" }, - "publicEventsListenerEndpoint": { - "description": "Optional. Public Events listener endpoint.", - "type": "string" - }, "registrationDestinationConfig": { "$ref": "DestinationConfig", "description": "Registration endpoint for auto registration." @@ -3178,6 +3178,11 @@ "readOnly": true, "type": "string" }, + "eventsListenerPscSa": { + "description": "Output only. Events listener PSC Service attachment. The value will be populated after provisioning the events listener with private connectivity enabled.", + "readOnly": true, + "type": "string" + }, "status": { "$ref": "EventingStatus", "description": "Output only. Current status of eventing.", @@ -3201,13 +3206,13 @@ "STATE_UNSPECIFIED", "ACTIVE", "ERROR", - "PUBLIC_ENDPOINT_REQUIRED" + "INGRESS_ENDPOINT_REQUIRED" ], "enumDescriptions": [ "Default state.", "Eventing is enabled and ready to receive events.", "Eventing is not active due to an error.", - "Public endpoint required." + "Ingress endpoint required." ], "readOnly": true, "type": "string" @@ -4866,6 +4871,16 @@ "readOnly": true, "type": "string" }, + "description": { + "description": "Output only. Brief Description of action", + "readOnly": true, + "type": "string" + }, + "displayName": { + "description": "Output only. Display Name of action to be shown on client side", + "readOnly": true, + "type": "string" + }, "inputJsonSchema": { "$ref": "JsonSchema", "description": "Output only. JsonSchema representation of this action's input metadata", diff --git a/connectors/v1/connectors-gen.go b/connectors/v1/connectors-gen.go index 1906cd90c5e..878c7f0abce 100644 --- a/connectors/v1/connectors-gen.go +++ b/connectors/v1/connectors-gen.go @@ -1906,13 +1906,14 @@ type EventingConfig struct { // EnrichmentEnabled: Enrichment Enabled. EnrichmentEnabled bool `json:"enrichmentEnabled,omitempty"` + // EventsListenerIngressEndpoint: Optional. Ingress endpoint of the + // event listener. This is used only when private connectivity is + // enabled. + EventsListenerIngressEndpoint string `json:"eventsListenerIngressEndpoint,omitempty"` + // PrivateConnectivityEnabled: Optional. Private Connectivity Enabled. PrivateConnectivityEnabled bool `json:"privateConnectivityEnabled,omitempty"` - // PublicEventsListenerEndpoint: Optional. Public Events listener - // endpoint. - PublicEventsListenerEndpoint string `json:"publicEventsListenerEndpoint,omitempty"` - // RegistrationDestinationConfig: Registration endpoint for auto // registration. RegistrationDestinationConfig *DestinationConfig `json:"registrationDestinationConfig,omitempty"` @@ -2056,6 +2057,11 @@ type EventingRuntimeData struct { // value will populated after provisioning the events listener. EventsListenerEndpoint string `json:"eventsListenerEndpoint,omitempty"` + // EventsListenerPscSa: Output only. Events listener PSC Service + // attachment. The value will be populated after provisioning the events + // listener with private connectivity enabled. + EventsListenerPscSa string `json:"eventsListenerPscSa,omitempty"` + // Status: Output only. Current status of eventing. Status *EventingStatus `json:"status,omitempty"` @@ -2096,7 +2102,7 @@ type EventingStatus struct { // "STATE_UNSPECIFIED" - Default state. // "ACTIVE" - Eventing is enabled and ready to receive events. // "ERROR" - Eventing is not active due to an error. - // "PUBLIC_ENDPOINT_REQUIRED" - Public endpoint required. + // "INGRESS_ENDPOINT_REQUIRED" - Ingress endpoint required. State string `json:"state,omitempty"` // ForceSendFields is a list of field names (e.g. "Description") to @@ -4059,6 +4065,13 @@ type RuntimeActionSchema struct { // Action: Output only. Name of the action. Action string `json:"action,omitempty"` + // Description: Output only. Brief Description of action + Description string `json:"description,omitempty"` + + // DisplayName: Output only. Display Name of action to be shown on + // client side + DisplayName string `json:"displayName,omitempty"` + // InputJsonSchema: Output only. JsonSchema representation of this // action's input metadata InputJsonSchema *JsonSchema `json:"inputJsonSchema,omitempty"` diff --git a/connectors/v2/connectors-api.json b/connectors/v2/connectors-api.json index 8cd380e57b0..190097637ca 100644 --- a/connectors/v2/connectors-api.json +++ b/connectors/v2/connectors-api.json @@ -558,13 +558,21 @@ } } }, - "revision": "20230906", + "revision": "20230913", "rootUrl": "https://connectors.googleapis.com/", "schemas": { "Action": { "description": "Action message contains metadata information about a single action present in the external system.", "id": "Action", "properties": { + "description": { + "description": "Brief Description of action", + "type": "string" + }, + "displayName": { + "description": "Display Name of action to be shown on client side", + "type": "string" + }, "inputJsonSchema": { "$ref": "JsonSchema", "description": "JsonSchema representation of this actions's input schema" @@ -895,6 +903,14 @@ "description": "Input Parameter message contains metadata about the parameters required for executing an Action.", "id": "InputParameter", "properties": { + "additionalDetails": { + "additionalProperties": { + "description": "Properties of the object.", + "type": "any" + }, + "description": "The following map contains fields that are not explicitly mentioned above,this give connectors the flexibility to add new metadata fields.", + "type": "object" + }, "dataType": { "description": "The data type of the Parameter", "enum": [ @@ -1512,7 +1528,7 @@ "type": "string" }, "value": { - "type": "string" + "type": "any" } }, "type": "object" diff --git a/connectors/v2/connectors-gen.go b/connectors/v2/connectors-gen.go index 6e0750ad0e1..4550ed02040 100644 --- a/connectors/v2/connectors-gen.go +++ b/connectors/v2/connectors-gen.go @@ -223,6 +223,12 @@ type ProjectsLocationsConnectionsEntityTypesEntitiesService struct { // Action: Action message contains metadata information about a single // action present in the external system. type Action struct { + // Description: Brief Description of action + Description string `json:"description,omitempty"` + + // DisplayName: Display Name of action to be shown on client side + DisplayName string `json:"displayName,omitempty"` + // InputJsonSchema: JsonSchema representation of this actions's input // schema InputJsonSchema *JsonSchema `json:"inputJsonSchema,omitempty"` @@ -244,7 +250,7 @@ type Action struct { // server. googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "InputJsonSchema") to + // ForceSendFields is a list of field names (e.g. "Description") 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 @@ -252,13 +258,12 @@ type Action struct { // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "InputJsonSchema") 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. "Description") 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:"-"` } @@ -604,6 +609,11 @@ func (s *Field) MarshalJSON() ([]byte, error) { // InputParameter: Input Parameter message contains metadata about the // parameters required for executing an Action. type InputParameter struct { + // AdditionalDetails: The following map contains fields that are not + // explicitly mentioned above,this give connectors the flexibility to + // add new metadata fields. + AdditionalDetails googleapi.RawMessage `json:"additionalDetails,omitempty"` + // DataType: The data type of the Parameter // // Possible values: @@ -671,20 +681,21 @@ type InputParameter struct { // Nullable: Specifies whether a null value is allowed. Nullable bool `json:"nullable,omitempty"` - // ForceSendFields is a list of field names (e.g. "DataType") to - // unconditionally include in API requests. By default, fields with + // ForceSendFields is a list of field names (e.g. "AdditionalDetails") + // 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. "DataType") 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. "AdditionalDetails") 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:"-"` } @@ -1012,7 +1023,7 @@ type QueryParameter struct { // "TIMESTAMP_WITH_TIMEZONE" - Timestamp with timezone type. DataType string `json:"dataType,omitempty"` - Value string `json:"value,omitempty"` + Value interface{} `json:"value,omitempty"` // ForceSendFields is a list of field names (e.g. "DataType") to // unconditionally include in API requests. By default, fields with diff --git a/contactcenterinsights/v1/contactcenterinsights-api.json b/contactcenterinsights/v1/contactcenterinsights-api.json index 5133927db82..15963128aea 100644 --- a/contactcenterinsights/v1/contactcenterinsights-api.json +++ b/contactcenterinsights/v1/contactcenterinsights-api.json @@ -1384,7 +1384,7 @@ } } }, - "revision": "20230910", + "revision": "20230923", "rootUrl": "https://contactcenterinsights.googleapis.com/", "schemas": { "GoogleCloudContactcenterinsightsV1Analysis": { @@ -2605,12 +2605,6 @@ "properties": {}, "type": "object" }, - "GoogleCloudContactcenterinsightsV1ExportIssueModelResponse": { - "description": "Response from export issue model", - "id": "GoogleCloudContactcenterinsightsV1ExportIssueModelResponse", - "properties": {}, - "type": "object" - }, "GoogleCloudContactcenterinsightsV1FaqAnswerData": { "description": "Agent Assist frequently-asked-question answer data.", "id": "GoogleCloudContactcenterinsightsV1FaqAnswerData", @@ -2667,12 +2661,6 @@ "properties": {}, "type": "object" }, - "GoogleCloudContactcenterinsightsV1ImportIssueModelResponse": { - "description": "Response from import issue model", - "id": "GoogleCloudContactcenterinsightsV1ImportIssueModelResponse", - "properties": {}, - "type": "object" - }, "GoogleCloudContactcenterinsightsV1IngestConversationsMetadata": { "description": "The metadata for an IngestConversations operation.", "id": "GoogleCloudContactcenterinsightsV1IngestConversationsMetadata", @@ -3466,6 +3454,10 @@ "$ref": "GoogleCloudContactcenterinsightsV1RedactionConfig", "description": "Default DLP redaction resources to be applied while ingesting conversations." }, + "speechConfig": { + "$ref": "GoogleCloudContactcenterinsightsV1SpeechConfig", + "description": "Optional. Default Speech-to-Text resources to be used while ingesting audio files. Optional, CCAI Insights will create a default if not provided." + }, "updateTime": { "description": "Output only. The time at which the settings were last updated.", "format": "google-datetime", @@ -3556,6 +3548,17 @@ }, "type": "object" }, + "GoogleCloudContactcenterinsightsV1SpeechConfig": { + "description": "Speech-to-Text configuration.", + "id": "GoogleCloudContactcenterinsightsV1SpeechConfig", + "properties": { + "speechRecognizer": { + "description": "The fully-qualified Speech Recognizer resource name. Format: `projects/{project_id}/locations/{location}/recognizer/{recognizer}`", + "type": "string" + } + }, + "type": "object" + }, "GoogleCloudContactcenterinsightsV1UndeployIssueModelMetadata": { "description": "Metadata for undeploying an issue model.", "id": "GoogleCloudContactcenterinsightsV1UndeployIssueModelMetadata", @@ -3649,6 +3652,10 @@ "redactionConfig": { "$ref": "GoogleCloudContactcenterinsightsV1RedactionConfig", "description": "Optional. DLP settings for transcript redaction. Optional, will default to the config specified in Settings." + }, + "speechConfig": { + "$ref": "GoogleCloudContactcenterinsightsV1SpeechConfig", + "description": "Optional. Default Speech-to-Text configuration. Optional, will default to the config specified in Settings." } }, "type": "object" @@ -4786,12 +4793,6 @@ "properties": {}, "type": "object" }, - "GoogleCloudContactcenterinsightsV1alpha1ExportIssueModelResponse": { - "description": "Response from export issue model", - "id": "GoogleCloudContactcenterinsightsV1alpha1ExportIssueModelResponse", - "properties": {}, - "type": "object" - }, "GoogleCloudContactcenterinsightsV1alpha1FaqAnswerData": { "description": "Agent Assist frequently-asked-question answer data.", "id": "GoogleCloudContactcenterinsightsV1alpha1FaqAnswerData", @@ -4848,12 +4849,6 @@ "properties": {}, "type": "object" }, - "GoogleCloudContactcenterinsightsV1alpha1ImportIssueModelResponse": { - "description": "Response from import issue model", - "id": "GoogleCloudContactcenterinsightsV1alpha1ImportIssueModelResponse", - "properties": {}, - "type": "object" - }, "GoogleCloudContactcenterinsightsV1alpha1IngestConversationsMetadata": { "description": "The metadata for an IngestConversations operation.", "id": "GoogleCloudContactcenterinsightsV1alpha1IngestConversationsMetadata", @@ -5391,6 +5386,17 @@ }, "type": "object" }, + "GoogleCloudContactcenterinsightsV1alpha1SpeechConfig": { + "description": "Speech-to-Text configuration.", + "id": "GoogleCloudContactcenterinsightsV1alpha1SpeechConfig", + "properties": { + "speechRecognizer": { + "description": "The fully-qualified Speech Recognizer resource name. Format: `projects/{project_id}/locations/{location}/recognizer/{recognizer}`", + "type": "string" + } + }, + "type": "object" + }, "GoogleCloudContactcenterinsightsV1alpha1UndeployIssueModelMetadata": { "description": "Metadata for undeploying an issue model.", "id": "GoogleCloudContactcenterinsightsV1alpha1UndeployIssueModelMetadata", @@ -5484,6 +5490,10 @@ "redactionConfig": { "$ref": "GoogleCloudContactcenterinsightsV1alpha1RedactionConfig", "description": "Optional. DLP settings for transcript redaction. Optional, will default to the config specified in Settings." + }, + "speechConfig": { + "$ref": "GoogleCloudContactcenterinsightsV1alpha1SpeechConfig", + "description": "Optional. Default Speech-to-Text configuration. Optional, will default to the config specified in Settings." } }, "type": "object" diff --git a/contactcenterinsights/v1/contactcenterinsights-gen.go b/contactcenterinsights/v1/contactcenterinsights-gen.go index b3f0790aa20..7ce88d76bf9 100644 --- a/contactcenterinsights/v1/contactcenterinsights-gen.go +++ b/contactcenterinsights/v1/contactcenterinsights-gen.go @@ -2226,11 +2226,6 @@ func (s *GoogleCloudContactcenterinsightsV1ExportInsightsDataRequestBigQueryDest type GoogleCloudContactcenterinsightsV1ExportInsightsDataResponse struct { } -// GoogleCloudContactcenterinsightsV1ExportIssueModelResponse: Response -// from export issue model -type GoogleCloudContactcenterinsightsV1ExportIssueModelResponse struct { -} - // GoogleCloudContactcenterinsightsV1FaqAnswerData: Agent Assist // frequently-asked-question answer data. type GoogleCloudContactcenterinsightsV1FaqAnswerData struct { @@ -2335,11 +2330,6 @@ func (s *GoogleCloudContactcenterinsightsV1GcsSource) MarshalJSON() ([]byte, err type GoogleCloudContactcenterinsightsV1HoldData struct { } -// GoogleCloudContactcenterinsightsV1ImportIssueModelResponse: Response -// from import issue model -type GoogleCloudContactcenterinsightsV1ImportIssueModelResponse struct { -} - // GoogleCloudContactcenterinsightsV1IngestConversationsMetadata: The // metadata for an IngestConversations operation. type GoogleCloudContactcenterinsightsV1IngestConversationsMetadata struct { @@ -3656,6 +3646,11 @@ type GoogleCloudContactcenterinsightsV1Settings struct { // ingesting conversations. RedactionConfig *GoogleCloudContactcenterinsightsV1RedactionConfig `json:"redactionConfig,omitempty"` + // SpeechConfig: Optional. Default Speech-to-Text resources to be used + // while ingesting audio files. Optional, CCAI Insights will create a + // default if not provided. + SpeechConfig *GoogleCloudContactcenterinsightsV1SpeechConfig `json:"speechConfig,omitempty"` + // UpdateTime: Output only. The time at which the settings were last // updated. UpdateTime string `json:"updateTime,omitempty"` @@ -3865,6 +3860,38 @@ func (s *GoogleCloudContactcenterinsightsV1SmartReplyData) UnmarshalJSON(data [] return nil } +// GoogleCloudContactcenterinsightsV1SpeechConfig: Speech-to-Text +// configuration. +type GoogleCloudContactcenterinsightsV1SpeechConfig struct { + // SpeechRecognizer: The fully-qualified Speech Recognizer resource + // name. Format: + // `projects/{project_id}/locations/{location}/recognizer/{recognizer}` + SpeechRecognizer string `json:"speechRecognizer,omitempty"` + + // ForceSendFields is a list of field names (e.g. "SpeechRecognizer") 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. "SpeechRecognizer") 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 *GoogleCloudContactcenterinsightsV1SpeechConfig) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudContactcenterinsightsV1SpeechConfig + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // GoogleCloudContactcenterinsightsV1UndeployIssueModelMetadata: // Metadata for undeploying an issue model. type GoogleCloudContactcenterinsightsV1UndeployIssueModelMetadata struct { @@ -3998,6 +4025,10 @@ type GoogleCloudContactcenterinsightsV1UploadConversationRequest struct { // Optional, will default to the config specified in Settings. RedactionConfig *GoogleCloudContactcenterinsightsV1RedactionConfig `json:"redactionConfig,omitempty"` + // SpeechConfig: Optional. Default Speech-to-Text configuration. + // Optional, will default to the config specified in Settings. + SpeechConfig *GoogleCloudContactcenterinsightsV1SpeechConfig `json:"speechConfig,omitempty"` + // ForceSendFields is a list of field names (e.g. "Conversation") to // unconditionally include in API requests. By default, fields with // empty or default values are omitted from API requests. However, any @@ -5816,11 +5847,6 @@ func (s *GoogleCloudContactcenterinsightsV1alpha1ExportInsightsDataRequestBigQue type GoogleCloudContactcenterinsightsV1alpha1ExportInsightsDataResponse struct { } -// GoogleCloudContactcenterinsightsV1alpha1ExportIssueModelResponse: -// Response from export issue model -type GoogleCloudContactcenterinsightsV1alpha1ExportIssueModelResponse struct { -} - // GoogleCloudContactcenterinsightsV1alpha1FaqAnswerData: Agent Assist // frequently-asked-question answer data. type GoogleCloudContactcenterinsightsV1alpha1FaqAnswerData struct { @@ -5925,11 +5951,6 @@ func (s *GoogleCloudContactcenterinsightsV1alpha1GcsSource) MarshalJSON() ([]byt type GoogleCloudContactcenterinsightsV1alpha1HoldData struct { } -// GoogleCloudContactcenterinsightsV1alpha1ImportIssueModelResponse: -// Response from import issue model -type GoogleCloudContactcenterinsightsV1alpha1ImportIssueModelResponse struct { -} - // GoogleCloudContactcenterinsightsV1alpha1IngestConversationsMetadata: // The metadata for an IngestConversations operation. type GoogleCloudContactcenterinsightsV1alpha1IngestConversationsMetadata struct { @@ -6853,6 +6874,38 @@ func (s *GoogleCloudContactcenterinsightsV1alpha1SmartReplyData) UnmarshalJSON(d return nil } +// GoogleCloudContactcenterinsightsV1alpha1SpeechConfig: Speech-to-Text +// configuration. +type GoogleCloudContactcenterinsightsV1alpha1SpeechConfig struct { + // SpeechRecognizer: The fully-qualified Speech Recognizer resource + // name. Format: + // `projects/{project_id}/locations/{location}/recognizer/{recognizer}` + SpeechRecognizer string `json:"speechRecognizer,omitempty"` + + // ForceSendFields is a list of field names (e.g. "SpeechRecognizer") 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. "SpeechRecognizer") 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 *GoogleCloudContactcenterinsightsV1alpha1SpeechConfig) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudContactcenterinsightsV1alpha1SpeechConfig + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // GoogleCloudContactcenterinsightsV1alpha1UndeployIssueModelMetadata: // Metadata for undeploying an issue model. type GoogleCloudContactcenterinsightsV1alpha1UndeployIssueModelMetadata struct { @@ -6986,6 +7039,10 @@ type GoogleCloudContactcenterinsightsV1alpha1UploadConversationRequest struct { // Optional, will default to the config specified in Settings. RedactionConfig *GoogleCloudContactcenterinsightsV1alpha1RedactionConfig `json:"redactionConfig,omitempty"` + // SpeechConfig: Optional. Default Speech-to-Text configuration. + // Optional, will default to the config specified in Settings. + SpeechConfig *GoogleCloudContactcenterinsightsV1alpha1SpeechConfig `json:"speechConfig,omitempty"` + // ForceSendFields is a list of field names (e.g. "Conversation") to // unconditionally include in API requests. By default, fields with // empty or default values are omitted from API requests. However, any diff --git a/dataproc/v1/dataproc-api.json b/dataproc/v1/dataproc-api.json index a279b4c5f59..8d8df03f6ba 100644 --- a/dataproc/v1/dataproc-api.json +++ b/dataproc/v1/dataproc-api.json @@ -3001,7 +3001,7 @@ } } }, - "revision": "20230830", + "revision": "20230919", "rootUrl": "https://dataproc.googleapis.com/", "schemas": { "AcceleratorConfig": { @@ -3838,10 +3838,6 @@ "gcePdKmsKeyName": { "description": "Optional. The Cloud KMS key name to use for PD disk encryption for all instances in the cluster.", "type": "string" - }, - "kmsKey": { - "description": "Optional. The Cloud KMS key name to use for encrypting customer core content and cluster PD disk for all instances in the cluster.", - "type": "string" } }, "type": "object" @@ -3917,7 +3913,7 @@ "type": "string" }, "ttl": { - "description": "Optional. The duration after which the workload will be terminated. When the workload exceeds this duration, it will be unconditionally terminated without waiting for ongoing work to finish. If ttl is not specified for a batch workload, the workload will be allowed to run until it exits naturally (or runs forever without exiting). If ttl is not specified for an interactive session, it defaults to 24h. If ttl is not specified for a batch that uses 2.1+ runtime version, it defaults to 4h. Minimum value is 10 minutes; maximum value is 14 days (see JSON representation of Duration (https://developers.google.com/protocol-buffers/docs/proto3#json)). If both ttl and idle_ttl are specified (for an interactive session), the conditions are treated as OR conditions: the workload will be terminated when it has been idle for idle_ttl or when ttl has been exceeded, whichever occurs first.", + "description": "Optional. The duration after which the workload will be terminated, specified as the JSON representation for Duration (https://protobuf.dev/programming-guides/proto3/#json). When the workload exceeds this duration, it will be unconditionally terminated without waiting for ongoing work to finish. If ttl is not specified for a batch workload, the workload will be allowed to run until it exits naturally (or run forever without exiting). If ttl is not specified for an interactive session, it defaults to 24 hours. If ttl is not specified for a batch that uses 2.1+ runtime version, it defaults to 4 hours. Minimum value is 10 minutes; maximum value is 14 days. If both ttl and idle_ttl are specified (for an interactive session), the conditions are treated as OR conditions: the workload will be terminated when it has been idle for idle_ttl or when ttl has been exceeded, whichever occurs first.", "format": "google-duration", "type": "string" } @@ -3948,11 +3944,11 @@ "type": "object" }, "FlinkJob": { - "description": "A Dataproc job for running Apache Flink (https://flink.apache.org/) applications on YARN.", + "description": "A Dataproc job for running Apache Flink applications on YARN.", "id": "FlinkJob", "properties": { "args": { - "description": "Optional. The arguments to pass to the driver. Do not include arguments, such as --conf, that can be set as job properties, since a collision may occur that causes an incorrect job submission.", + "description": "Optional. The arguments to pass to the driver. Do not include arguments, such as --conf, that can be set as job properties, since a collision might occur that causes an incorrect job submission.", "items": { "type": "string" }, @@ -3970,7 +3966,7 @@ "description": "Optional. The runtime log config for job execution." }, "mainClass": { - "description": "The name of the driver's main class. The jar file that contains the class must be in the default CLASSPATH or specified in jar_file_uris.", + "description": "The name of the driver's main class. The jar file that contains the class must be in the default CLASSPATH or specified in jarFileUris.", "type": "string" }, "mainJarFileUri": { @@ -3981,11 +3977,11 @@ "additionalProperties": { "type": "string" }, - "description": "Optional. A mapping of property names to values, used to configure Flink. Properties that conflict with values set by the Dataproc API may beoverwritten. Can include properties set in/etc/flink/conf/flink-defaults.conf and classes in user code.", + "description": "Optional. A mapping of property names to values, used to configure Flink. Properties that conflict with values set by the Dataproc API might beoverwritten. Can include properties set in/etc/flink/conf/flink-defaults.conf and classes in user code.", "type": "object" }, "savepointUri": { - "description": "Optional. HCFS URI of the savepoint which contains the last saved progress for this job", + "description": "Optional. HCFS URI of the savepoint, which contains the last saved progress for starting the current job.", "type": "string" } }, @@ -4263,7 +4259,7 @@ "type": "array" }, "args": { - "description": "Optional. The arguments to pass to the driver. Do not include arguments, such as -libjars or -Dfoo=bar, that can be set as job properties, since a collision may occur that causes an incorrect job submission.", + "description": "Optional. The arguments to pass to the driver. Do not include arguments, such as -libjars or -Dfoo=bar, that can be set as job properties, since a collision might occur that causes an incorrect job submission.", "items": { "type": "string" }, @@ -4299,7 +4295,7 @@ "additionalProperties": { "type": "string" }, - "description": "Optional. A mapping of property names to values, used to configure Hadoop. Properties that conflict with values set by the Dataproc API may be overwritten. Can include properties set in /etc/hadoop/conf/*-site and classes in user code.", + "description": "Optional. A mapping of property names to values, used to configure Hadoop. Properties that conflict with values set by the Dataproc API might be overwritten. Can include properties set in /etc/hadoop/conf/*-site and classes in user code.", "type": "object" } }, @@ -4324,7 +4320,7 @@ "additionalProperties": { "type": "string" }, - "description": "Optional. A mapping of property names and values, used to configure Hive. Properties that conflict with values set by the Dataproc API may be overwritten. Can include properties set in /etc/hadoop/conf/*-site.xml, /etc/hive/conf/hive-site.xml, and classes in user code.", + "description": "Optional. A mapping of property names and values, used to configure Hive. Properties that conflict with values set by the Dataproc API might be overwritten. Can include properties set in /etc/hadoop/conf/*-site.xml, /etc/hive/conf/hive-site.xml, and classes in user code.", "type": "object" }, "queryFileUri": { @@ -4614,7 +4610,7 @@ "type": "boolean" }, "driverControlFilesUri": { - "description": "Output only. If present, the location of miscellaneous control files which may be used as part of job setup and handling. If not present, control files may be placed in the same location as driver_output_uri.", + "description": "Output only. If present, the location of miscellaneous control files which can be used as part of job setup and handling. If not present, control files might be placed in the same location as driver_output_uri.", "readOnly": true, "type": "string" }, @@ -4640,7 +4636,7 @@ "description": "Optional. Job is a Hive job." }, "jobUuid": { - "description": "Output only. A UUID that uniquely identifies a job within the project over time. This is in contrast to a user-settable reference.job_id that may be reused over time.", + "description": "Output only. A UUID that uniquely identifies a job within the project over time. This is in contrast to a user-settable reference.job_id that might be reused over time.", "readOnly": true, "type": "string" }, @@ -4648,7 +4644,7 @@ "additionalProperties": { "type": "string" }, - "description": "Optional. The labels to associate with this job. Label keys must contain 1 to 63 characters, and must conform to RFC 1035 (https://www.ietf.org/rfc/rfc1035.txt). Label values may be empty, but, if present, must contain 1 to 63 characters, and must conform to RFC 1035 (https://www.ietf.org/rfc/rfc1035.txt). No more than 32 labels can be associated with a job.", + "description": "Optional. The labels to associate with this job. Label keys must contain 1 to 63 characters, and must conform to RFC 1035 (https://www.ietf.org/rfc/rfc1035.txt). Label values can be empty, but, if present, must contain 1 to 63 characters, and must conform to RFC 1035 (https://www.ietf.org/rfc/rfc1035.txt). No more than 32 labels can be associated with a job.", "type": "object" }, "pigJob": { @@ -4689,7 +4685,7 @@ }, "status": { "$ref": "JobStatus", - "description": "Output only. The job status. Additional application-specific status information may be contained in the type_job and yarn_applications fields.", + "description": "Output only. The job status. Additional application-specific status information might be contained in the type_job and yarn_applications fields.", "readOnly": true }, "statusHistory": { @@ -4705,7 +4701,7 @@ "description": "Optional. Job is a Trino job." }, "yarnApplications": { - "description": "Output only. The collection of YARN applications spun up by this job.Beta Feature: This report is available for testing purposes only. It may be changed before final release.", + "description": "Output only. The collection of YARN applications spun up by this job.Beta Feature: This report is available for testing purposes only. It might be changed before final release.", "items": { "$ref": "YarnApplication" }, @@ -4786,12 +4782,12 @@ "id": "JobScheduling", "properties": { "maxFailuresPerHour": { - "description": "Optional. Maximum number of times per hour a driver may be restarted as a result of driver exiting with non-zero code before job is reported failed.A job may be reported as thrashing if the driver exits with a non-zero code four times within a 10-minute window.Maximum value is 10.Note: This restartable job option is not supported in Dataproc workflow templates (https://cloud.google.com/dataproc/docs/concepts/workflows/using-workflows#adding_jobs_to_a_template).", + "description": "Optional. Maximum number of times per hour a driver can be restarted as a result of driver exiting with non-zero code before job is reported failed.A job might be reported as thrashing if the driver exits with a non-zero code four times within a 10-minute window.Maximum value is 10.Note: This restartable job option is not supported in Dataproc workflow templates (https://cloud.google.com/dataproc/docs/concepts/workflows/using-workflows#adding_jobs_to_a_template).", "format": "int32", "type": "integer" }, "maxFailuresTotal": { - "description": "Optional. Maximum total number of times a driver may be restarted as a result of the driver exiting with a non-zero code. After the maximum number is reached, the job will be reported as failed.Maximum value is 240.Note: Currently, this restartable job option is not supported in Dataproc workflow templates (https://cloud.google.com/dataproc/docs/concepts/workflows/using-workflows#adding_jobs_to_a_template).", + "description": "Optional. Maximum total number of times a driver can be restarted as a result of the driver exiting with a non-zero code. After the maximum number is reached, the job will be reported as failed.Maximum value is 240.Note: Currently, this restartable job option is not supported in Dataproc workflow templates (https://cloud.google.com/dataproc/docs/concepts/workflows/using-workflows#adding_jobs_to_a_template).", "format": "int32", "type": "integer" } @@ -4853,8 +4849,8 @@ "enumDescriptions": [ "The job substate is unknown.", "The Job is submitted to the agent.Applies to RUNNING state.", - "The Job has been received and is awaiting execution (it may be waiting for a condition to be met). See the \"details\" field for the reason for the delay.Applies to RUNNING state.", - "The agent-reported status is out of date, which may be caused by a loss of communication between the agent and Dataproc. If the agent does not send a timely update, the job will fail.Applies to RUNNING state." + "The Job has been received and is awaiting execution (it might be waiting for a condition to be met). See the \"details\" field for the reason for the delay.Applies to RUNNING state.", + "The agent-reported status is out of date, which can be caused by a loss of communication between the agent and Dataproc. If the agent does not send a timely update, the job will fail.Applies to RUNNING state." ], "readOnly": true, "type": "string" @@ -5207,7 +5203,7 @@ ], "type": "string" }, - "description": "The per-package log levels for the driver. This may include \"root\" package name to configure rootLogger. Examples: - 'com.google = FATAL' - 'root = INFO' - 'org.apache = DEBUG'", + "description": "The per-package log levels for the driver. This can include \"root\" package name to configure rootLogger. Examples: - 'com.google = FATAL' - 'root = INFO' - 'org.apache = DEBUG'", "type": "object" } }, @@ -5526,6 +5522,10 @@ "description": "A job executed by the workflow.", "id": "OrderedJob", "properties": { + "flinkJob": { + "$ref": "FlinkJob", + "description": "Optional. Job is a Flink job." + }, "hadoopJob": { "$ref": "HadoopJob", "description": "Optional. Job is a Hadoop job." @@ -5640,7 +5640,7 @@ "additionalProperties": { "type": "string" }, - "description": "Optional. A mapping of property names to values, used to configure Pig. Properties that conflict with values set by the Dataproc API may be overwritten. Can include properties set in /etc/hadoop/conf/*-site.xml, /etc/pig/conf/pig.properties, and classes in user code.", + "description": "Optional. A mapping of property names to values, used to configure Pig. Properties that conflict with values set by the Dataproc API might be overwritten. Can include properties set in /etc/hadoop/conf/*-site.xml, /etc/pig/conf/pig.properties, and classes in user code.", "type": "object" }, "queryFileUri": { @@ -5827,7 +5827,7 @@ "additionalProperties": { "type": "string" }, - "description": "Optional. A mapping of property names to values, used to configure PySpark. Properties that conflict with values set by the Dataproc API may be overwritten. Can include properties set in /etc/spark/conf/spark-defaults.conf and classes in user code.", + "description": "Optional. A mapping of property names to values, used to configure PySpark. Properties that conflict with values set by the Dataproc API might be overwritten. Can include properties set in /etc/spark/conf/spark-defaults.conf and classes in user code.", "type": "object" }, "pythonFileUris": { @@ -6285,6 +6285,11 @@ "format": "google-datetime", "readOnly": true, "type": "string" + }, + "uuid": { + "description": "Output only. A session template UUID (Unique Universal Identifier). The service generates this value when it creates the session template.", + "readOnly": true, + "type": "string" } }, "type": "object" @@ -6469,7 +6474,7 @@ "description": "Optional. The runtime log config for job execution." }, "mainClass": { - "description": "The name of the driver's main class. The jar file that contains the class must be in the default CLASSPATH or specified in jar_file_uris.", + "description": "The name of the driver's main class. The jar file that contains the class must be in the default CLASSPATH or specified in SparkJob.jar_file_uris.", "type": "string" }, "mainJarFileUri": { @@ -6480,7 +6485,7 @@ "additionalProperties": { "type": "string" }, - "description": "Optional. A mapping of property names to values, used to configure Spark. Properties that conflict with values set by the Dataproc API may be overwritten. Can include properties set in /etc/spark/conf/spark-defaults.conf and classes in user code.", + "description": "Optional. A mapping of property names to values, used to configure Spark. Properties that conflict with values set by the Dataproc API might be overwritten. Can include properties set in /etc/spark/conf/spark-defaults.conf and classes in user code.", "type": "object" } }, @@ -6555,7 +6560,7 @@ "additionalProperties": { "type": "string" }, - "description": "Optional. A mapping of property names to values, used to configure SparkR. Properties that conflict with values set by the Dataproc API may be overwritten. Can include properties set in /etc/spark/conf/spark-defaults.conf and classes in user code.", + "description": "Optional. A mapping of property names to values, used to configure SparkR. Properties that conflict with values set by the Dataproc API might be overwritten. Can include properties set in /etc/spark/conf/spark-defaults.conf and classes in user code.", "type": "object" } }, @@ -6605,7 +6610,7 @@ "additionalProperties": { "type": "string" }, - "description": "Optional. A mapping of property names to values, used to configure Spark SQL's SparkConf. Properties that conflict with values set by the Dataproc API may be overwritten.", + "description": "Optional. A mapping of property names to values, used to configure Spark SQL's SparkConf. Properties that conflict with values set by the Dataproc API might be overwritten.", "type": "object" }, "queryFileUri": { diff --git a/dataproc/v1/dataproc-gen.go b/dataproc/v1/dataproc-gen.go index 36fea3ab347..03fd535d72b 100644 --- a/dataproc/v1/dataproc-gen.go +++ b/dataproc/v1/dataproc-gen.go @@ -1627,11 +1627,6 @@ type EncryptionConfig struct { // encryption for all instances in the cluster. GcePdKmsKeyName string `json:"gcePdKmsKeyName,omitempty"` - // KmsKey: Optional. The Cloud KMS key name to use for encrypting - // customer core content and cluster PD disk for all instances in the - // cluster. - KmsKey string `json:"kmsKey,omitempty"` - // ForceSendFields is a list of field names (e.g. "GcePdKmsKeyName") to // unconditionally include in API requests. By default, fields with // empty or default values are omitted from API requests. However, any @@ -1766,19 +1761,19 @@ type ExecutionConfig struct { SubnetworkUri string `json:"subnetworkUri,omitempty"` // Ttl: Optional. The duration after which the workload will be - // terminated. When the workload exceeds this duration, it will be - // unconditionally terminated without waiting for ongoing work to - // finish. If ttl is not specified for a batch workload, the workload - // will be allowed to run until it exits naturally (or runs forever - // without exiting). If ttl is not specified for an interactive session, - // it defaults to 24h. If ttl is not specified for a batch that uses - // 2.1+ runtime version, it defaults to 4h. Minimum value is 10 minutes; - // maximum value is 14 days (see JSON representation of Duration - // (https://developers.google.com/protocol-buffers/docs/proto3#json)). - // If both ttl and idle_ttl are specified (for an interactive session), - // the conditions are treated as OR conditions: the workload will be - // terminated when it has been idle for idle_ttl or when ttl has been - // exceeded, whichever occurs first. + // terminated, specified as the JSON representation for Duration + // (https://protobuf.dev/programming-guides/proto3/#json). When the + // workload exceeds this duration, it will be unconditionally terminated + // without waiting for ongoing work to finish. If ttl is not specified + // for a batch workload, the workload will be allowed to run until it + // exits naturally (or run forever without exiting). If ttl is not + // specified for an interactive session, it defaults to 24 hours. If ttl + // is not specified for a batch that uses 2.1+ runtime version, it + // defaults to 4 hours. Minimum value is 10 minutes; maximum value is 14 + // days. If both ttl and idle_ttl are specified (for an interactive + // session), the conditions are treated as OR conditions: the workload + // will be terminated when it has been idle for idle_ttl or when ttl has + // been exceeded, whichever occurs first. Ttl string `json:"ttl,omitempty"` // ForceSendFields is a list of field names (e.g. "IdleTtl") to @@ -1864,12 +1859,12 @@ func (s *Expr) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// FlinkJob: A Dataproc job for running Apache Flink -// (https://flink.apache.org/) applications on YARN. +// FlinkJob: A Dataproc job for running Apache Flink applications on +// YARN. type FlinkJob struct { // Args: Optional. The arguments to pass to the driver. Do not include // arguments, such as --conf, that can be set as job properties, since a - // collision may occur that causes an incorrect job submission. + // collision might occur that causes an incorrect job submission. Args []string `json:"args,omitempty"` // JarFileUris: Optional. HCFS URIs of jar files to add to the @@ -1881,7 +1876,7 @@ type FlinkJob struct { // MainClass: The name of the driver's main class. The jar file that // contains the class must be in the default CLASSPATH or specified in - // jar_file_uris. + // jarFileUris. MainClass string `json:"mainClass,omitempty"` // MainJarFileUri: The HCFS URI of the jar file that contains the main @@ -1890,12 +1885,12 @@ type FlinkJob struct { // Properties: Optional. A mapping of property names to values, used to // configure Flink. Properties that conflict with values set by the - // Dataproc API may beoverwritten. Can include properties set + // Dataproc API might beoverwritten. Can include properties set // in/etc/flink/conf/flink-defaults.conf and classes in user code. Properties map[string]string `json:"properties,omitempty"` - // SavepointUri: Optional. HCFS URI of the savepoint which contains the - // last saved progress for this job + // SavepointUri: Optional. HCFS URI of the savepoint, which contains the + // last saved progress for starting the current job. SavepointUri string `json:"savepointUri,omitempty"` // ForceSendFields is a list of field names (e.g. "Args") to @@ -2431,8 +2426,8 @@ type HadoopJob struct { // Args: Optional. The arguments to pass to the driver. Do not include // arguments, such as -libjars or -Dfoo=bar, that can be set as job - // properties, since a collision may occur that causes an incorrect job - // submission. + // properties, since a collision might occur that causes an incorrect + // job submission. Args []string `json:"args,omitempty"` // FileUris: Optional. HCFS (Hadoop Compatible Filesystem) URIs of files @@ -2461,7 +2456,7 @@ type HadoopJob struct { // Properties: Optional. A mapping of property names to values, used to // configure Hadoop. Properties that conflict with values set by the - // Dataproc API may be overwritten. Can include properties set in + // Dataproc API might be overwritten. Can include properties set in // /etc/hadoop/conf/*-site and classes in user code. Properties map[string]string `json:"properties,omitempty"` @@ -2503,7 +2498,7 @@ type HiveJob struct { // Properties: Optional. A mapping of property names and values, used to // configure Hive. Properties that conflict with values set by the - // Dataproc API may be overwritten. Can include properties set in + // Dataproc API might be overwritten. Can include properties set in // /etc/hadoop/conf/*-site.xml, /etc/hive/conf/hive-site.xml, and // classes in user code. Properties map[string]string `json:"properties,omitempty"` @@ -3029,9 +3024,9 @@ type Job struct { Done bool `json:"done,omitempty"` // DriverControlFilesUri: Output only. If present, the location of - // miscellaneous control files which may be used as part of job setup - // and handling. If not present, control files may be placed in the same - // location as driver_output_uri. + // miscellaneous control files which can be used as part of job setup + // and handling. If not present, control files might be placed in the + // same location as driver_output_uri. DriverControlFilesUri string `json:"driverControlFilesUri,omitempty"` // DriverOutputResourceUri: Output only. A URI pointing to the location @@ -3052,12 +3047,12 @@ type Job struct { // JobUuid: Output only. A UUID that uniquely identifies a job within // the project over time. This is in contrast to a user-settable - // reference.job_id that may be reused over time. + // reference.job_id that might be reused over time. JobUuid string `json:"jobUuid,omitempty"` // Labels: Optional. The labels to associate with this job. Label keys // must contain 1 to 63 characters, and must conform to RFC 1035 - // (https://www.ietf.org/rfc/rfc1035.txt). Label values may be empty, + // (https://www.ietf.org/rfc/rfc1035.txt). Label values can be empty, // but, if present, must contain 1 to 63 characters, and must conform to // RFC 1035 (https://www.ietf.org/rfc/rfc1035.txt). No more than 32 // labels can be associated with a job. @@ -3095,7 +3090,7 @@ type Job struct { SparkSqlJob *SparkSqlJob `json:"sparkSqlJob,omitempty"` // Status: Output only. The job status. Additional application-specific - // status information may be contained in the type_job and + // status information might be contained in the type_job and // yarn_applications fields. Status *JobStatus `json:"status,omitempty"` @@ -3107,7 +3102,7 @@ type Job struct { // YarnApplications: Output only. The collection of YARN applications // spun up by this job.Beta Feature: This report is available for - // testing purposes only. It may be changed before final release. + // testing purposes only. It might be changed before final release. YarnApplications []*YarnApplication `json:"yarnApplications,omitempty"` // ServerResponse contains the HTTP response code and headers from the @@ -3250,16 +3245,16 @@ func (s *JobReference) MarshalJSON() ([]byte, error) { // JobScheduling: Job scheduling options. type JobScheduling struct { // MaxFailuresPerHour: Optional. Maximum number of times per hour a - // driver may be restarted as a result of driver exiting with non-zero - // code before job is reported failed.A job may be reported as thrashing - // if the driver exits with a non-zero code four times within a - // 10-minute window.Maximum value is 10.Note: This restartable job + // driver can be restarted as a result of driver exiting with non-zero + // code before job is reported failed.A job might be reported as + // thrashing if the driver exits with a non-zero code four times within + // a 10-minute window.Maximum value is 10.Note: This restartable job // option is not supported in Dataproc workflow templates // (https://cloud.google.com/dataproc/docs/concepts/workflows/using-workflows#adding_jobs_to_a_template). MaxFailuresPerHour int64 `json:"maxFailuresPerHour,omitempty"` // MaxFailuresTotal: Optional. Maximum total number of times a driver - // may be restarted as a result of the driver exiting with a non-zero + // can be restarted as a result of the driver exiting with a non-zero // code. After the maximum number is reached, the job will be reported // as failed.Maximum value is 240.Note: Currently, this restartable job // option is not supported in Dataproc workflow templates @@ -3329,10 +3324,10 @@ type JobStatus struct { // "SUBMITTED" - The Job is submitted to the agent.Applies to RUNNING // state. // "QUEUED" - The Job has been received and is awaiting execution (it - // may be waiting for a condition to be met). See the "details" field + // might be waiting for a condition to be met). See the "details" field // for the reason for the delay.Applies to RUNNING state. // "STALE_STATUS" - The agent-reported status is out of date, which - // may be caused by a loss of communication between the agent and + // can be caused by a loss of communication between the agent and // Dataproc. If the agent does not send a timely update, the job will // fail.Applies to RUNNING state. Substate string `json:"substate,omitempty"` @@ -3931,7 +3926,7 @@ func (s *ListWorkflowTemplatesResponse) MarshalJSON() ([]byte, error) { // LoggingConfig: The runtime logging config of the job. type LoggingConfig struct { - // DriverLogLevels: The per-package log levels for the driver. This may + // DriverLogLevels: The per-package log levels for the driver. This can // include "root" package name to configure rootLogger. Examples: - // 'com.google = FATAL' - 'root = INFO' - 'org.apache = DEBUG' DriverLogLevels map[string]string `json:"driverLogLevels,omitempty"` @@ -4472,6 +4467,9 @@ func (s *Operation) MarshalJSON() ([]byte, error) { // OrderedJob: A job executed by the workflow. type OrderedJob struct { + // FlinkJob: Optional. Job is a Flink job. + FlinkJob *FlinkJob `json:"flinkJob,omitempty"` + // HadoopJob: Optional. Job is a Hadoop job. HadoopJob *HadoopJob `json:"hadoopJob,omitempty"` @@ -4524,7 +4522,7 @@ type OrderedJob struct { // TrinoJob: Optional. Job is a Trino job. TrinoJob *TrinoJob `json:"trinoJob,omitempty"` - // ForceSendFields is a list of field names (e.g. "HadoopJob") to + // ForceSendFields is a list of field names (e.g. "FlinkJob") 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 @@ -4532,7 +4530,7 @@ type OrderedJob struct { // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "HadoopJob") to include in + // NullFields is a list of field names (e.g. "FlinkJob") 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 @@ -4631,7 +4629,7 @@ type PigJob struct { // Properties: Optional. A mapping of property names to values, used to // configure Pig. Properties that conflict with values set by the - // Dataproc API may be overwritten. Can include properties set in + // Dataproc API might be overwritten. Can include properties set in // /etc/hadoop/conf/*-site.xml, /etc/pig/conf/pig.properties, and // classes in user code. Properties map[string]string `json:"properties,omitempty"` @@ -4945,7 +4943,7 @@ type PySparkJob struct { // Properties: Optional. A mapping of property names to values, used to // configure PySpark. Properties that conflict with values set by the - // Dataproc API may be overwritten. Can include properties set in + // Dataproc API might be overwritten. Can include properties set in // /etc/spark/conf/spark-defaults.conf and classes in user code. Properties map[string]string `json:"properties,omitempty"` @@ -5596,6 +5594,11 @@ type SessionTemplate struct { // UpdateTime: Output only. The time the template was last updated. UpdateTime string `json:"updateTime,omitempty"` + // Uuid: Output only. A session template UUID (Unique Universal + // Identifier). The service generates this value when it creates the + // session template. + Uuid string `json:"uuid,omitempty"` + // ServerResponse contains the HTTP response code and headers from the // server. googleapi.ServerResponse `json:"-"` @@ -5877,7 +5880,7 @@ type SparkJob struct { // MainClass: The name of the driver's main class. The jar file that // contains the class must be in the default CLASSPATH or specified in - // jar_file_uris. + // SparkJob.jar_file_uris. MainClass string `json:"mainClass,omitempty"` // MainJarFileUri: The HCFS URI of the jar file that contains the main @@ -5886,7 +5889,7 @@ type SparkJob struct { // Properties: Optional. A mapping of property names to values, used to // configure Spark. Properties that conflict with values set by the - // Dataproc API may be overwritten. Can include properties set in + // Dataproc API might be overwritten. Can include properties set in // /etc/spark/conf/spark-defaults.conf and classes in user code. Properties map[string]string `json:"properties,omitempty"` @@ -5985,7 +5988,7 @@ type SparkRJob struct { // Properties: Optional. A mapping of property names to values, used to // configure SparkR. Properties that conflict with values set by the - // Dataproc API may be overwritten. Can include properties set in + // Dataproc API might be overwritten. Can include properties set in // /etc/spark/conf/spark-defaults.conf and classes in user code. Properties map[string]string `json:"properties,omitempty"` @@ -6062,7 +6065,7 @@ type SparkSqlJob struct { // Properties: Optional. A mapping of property names to values, used to // configure Spark SQL's SparkConf. Properties that conflict with values - // set by the Dataproc API may be overwritten. + // set by the Dataproc API might be overwritten. Properties map[string]string `json:"properties,omitempty"` // QueryFileUri: The HCFS URI of the script that contains SQL queries. diff --git a/deploymentmanager/v0.alpha/deploymentmanager-api.json b/deploymentmanager/v0.alpha/deploymentmanager-api.json index a262ff1dedf..470391c26d7 100644 --- a/deploymentmanager/v0.alpha/deploymentmanager-api.json +++ b/deploymentmanager/v0.alpha/deploymentmanager-api.json @@ -224,7 +224,7 @@ ], "parameters": { "filter": { - "description": "A filter expression that filters resources listed in the response. Most Compute resources support two types of filter expressions: expressions that support regular expressions and expressions that follow API improvement proposal AIP-160. If you want to use AIP-160, your expression must specify the field name, an operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The operator must be either `=`, `!=`, `\u003e`, `\u003c`, `\u003c=`, `\u003e=` or `:`. For example, if you are filtering Compute Engine instances, you can exclude instances named `example-instance` by specifying `name != example-instance`. The `:` operator can be used with string fields to match substrings. For non-string fields it is equivalent to the `=` operator. The `:*` comparison can be used to test whether a key has been defined. For example, to find all objects with `owner` label use: ``` labels.owner:* ``` You can also filter nested fields. For example, you could specify `scheduling.automaticRestart = false` to include instances only if they are not scheduled for automatic restarts. You can use filtering on nested fields to filter based on resource labels. To filter on multiple expressions, provide each separate expression within parentheses. For example: ``` (scheduling.automaticRestart = true) (cpuPlatform = \"Intel Skylake\") ``` By default, each expression is an `AND` expression. However, you can include `AND` and `OR` expressions explicitly. For example: ``` (cpuPlatform = \"Intel Skylake\") OR (cpuPlatform = \"Intel Broadwell\") AND (scheduling.automaticRestart = true) ``` If you want to use a regular expression, use the `eq` (equal) or `ne` (not equal) operator against a single un-parenthesized expression with or without quotes or against multiple parenthesized expressions. Examples: `fieldname eq unquoted literal` `fieldname eq 'single quoted literal'` `fieldname eq \"double quoted literal\"` `(fieldname1 eq literal) (fieldname2 ne \"literal\")` The literal value is interpreted as a regular expression using Google RE2 library syntax. The literal value must match the entire field. For example, to filter for instances that do not end with name \"instance\", you would use `name ne .*instance`.", + "description": "A filter expression that filters resources listed in the response. Most Compute resources support two types of filter expressions: expressions that support regular expressions and expressions that follow API improvement proposal AIP-160. These two types of filter expressions cannot be mixed in one request. If you want to use AIP-160, your expression must specify the field name, an operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The operator must be either `=`, `!=`, `\u003e`, `\u003c`, `\u003c=`, `\u003e=` or `:`. For example, if you are filtering Compute Engine instances, you can exclude instances named `example-instance` by specifying `name != example-instance`. The `:*` comparison can be used to test whether a key has been defined. For example, to find all objects with `owner` label use: ``` labels.owner:* ``` You can also filter nested fields. For example, you could specify `scheduling.automaticRestart = false` to include instances only if they are not scheduled for automatic restarts. You can use filtering on nested fields to filter based on resource labels. To filter on multiple expressions, provide each separate expression within parentheses. For example: ``` (scheduling.automaticRestart = true) (cpuPlatform = \"Intel Skylake\") ``` By default, each expression is an `AND` expression. However, you can include `AND` and `OR` expressions explicitly. For example: ``` (cpuPlatform = \"Intel Skylake\") OR (cpuPlatform = \"Intel Broadwell\") AND (scheduling.automaticRestart = true) ``` If you want to use a regular expression, use the `eq` (equal) or `ne` (not equal) operator against a single un-parenthesized expression with or without quotes or against multiple parenthesized expressions. Examples: `fieldname eq unquoted literal` `fieldname eq 'single quoted literal'` `fieldname eq \"double quoted literal\"` `(fieldname1 eq literal) (fieldname2 ne \"literal\")` The literal value is interpreted as a regular expression using Google RE2 library syntax. The literal value must match the entire field. For example, to filter for instances that do not end with name \"instance\", you would use `name ne .*instance`. You cannot combine constraints on multiple fields using regular expressions.", "location": "query", "type": "string" }, @@ -563,7 +563,7 @@ ], "parameters": { "filter": { - "description": "A filter expression that filters resources listed in the response. Most Compute resources support two types of filter expressions: expressions that support regular expressions and expressions that follow API improvement proposal AIP-160. If you want to use AIP-160, your expression must specify the field name, an operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The operator must be either `=`, `!=`, `\u003e`, `\u003c`, `\u003c=`, `\u003e=` or `:`. For example, if you are filtering Compute Engine instances, you can exclude instances named `example-instance` by specifying `name != example-instance`. The `:` operator can be used with string fields to match substrings. For non-string fields it is equivalent to the `=` operator. The `:*` comparison can be used to test whether a key has been defined. For example, to find all objects with `owner` label use: ``` labels.owner:* ``` You can also filter nested fields. For example, you could specify `scheduling.automaticRestart = false` to include instances only if they are not scheduled for automatic restarts. You can use filtering on nested fields to filter based on resource labels. To filter on multiple expressions, provide each separate expression within parentheses. For example: ``` (scheduling.automaticRestart = true) (cpuPlatform = \"Intel Skylake\") ``` By default, each expression is an `AND` expression. However, you can include `AND` and `OR` expressions explicitly. For example: ``` (cpuPlatform = \"Intel Skylake\") OR (cpuPlatform = \"Intel Broadwell\") AND (scheduling.automaticRestart = true) ``` If you want to use a regular expression, use the `eq` (equal) or `ne` (not equal) operator against a single un-parenthesized expression with or without quotes or against multiple parenthesized expressions. Examples: `fieldname eq unquoted literal` `fieldname eq 'single quoted literal'` `fieldname eq \"double quoted literal\"` `(fieldname1 eq literal) (fieldname2 ne \"literal\")` The literal value is interpreted as a regular expression using Google RE2 library syntax. The literal value must match the entire field. For example, to filter for instances that do not end with name \"instance\", you would use `name ne .*instance`.", + "description": "A filter expression that filters resources listed in the response. Most Compute resources support two types of filter expressions: expressions that support regular expressions and expressions that follow API improvement proposal AIP-160. These two types of filter expressions cannot be mixed in one request. If you want to use AIP-160, your expression must specify the field name, an operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The operator must be either `=`, `!=`, `\u003e`, `\u003c`, `\u003c=`, `\u003e=` or `:`. For example, if you are filtering Compute Engine instances, you can exclude instances named `example-instance` by specifying `name != example-instance`. The `:*` comparison can be used to test whether a key has been defined. For example, to find all objects with `owner` label use: ``` labels.owner:* ``` You can also filter nested fields. For example, you could specify `scheduling.automaticRestart = false` to include instances only if they are not scheduled for automatic restarts. You can use filtering on nested fields to filter based on resource labels. To filter on multiple expressions, provide each separate expression within parentheses. For example: ``` (scheduling.automaticRestart = true) (cpuPlatform = \"Intel Skylake\") ``` By default, each expression is an `AND` expression. However, you can include `AND` and `OR` expressions explicitly. For example: ``` (cpuPlatform = \"Intel Skylake\") OR (cpuPlatform = \"Intel Broadwell\") AND (scheduling.automaticRestart = true) ``` If you want to use a regular expression, use the `eq` (equal) or `ne` (not equal) operator against a single un-parenthesized expression with or without quotes or against multiple parenthesized expressions. Examples: `fieldname eq unquoted literal` `fieldname eq 'single quoted literal'` `fieldname eq \"double quoted literal\"` `(fieldname1 eq literal) (fieldname2 ne \"literal\")` The literal value is interpreted as a regular expression using Google RE2 library syntax. The literal value must match the entire field. For example, to filter for instances that do not end with name \"instance\", you would use `name ne .*instance`. You cannot combine constraints on multiple fields using regular expressions.", "location": "query", "type": "string" }, @@ -927,7 +927,7 @@ "type": "string" }, "filter": { - "description": "A filter expression that filters resources listed in the response. Most Compute resources support two types of filter expressions: expressions that support regular expressions and expressions that follow API improvement proposal AIP-160. If you want to use AIP-160, your expression must specify the field name, an operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The operator must be either `=`, `!=`, `\u003e`, `\u003c`, `\u003c=`, `\u003e=` or `:`. For example, if you are filtering Compute Engine instances, you can exclude instances named `example-instance` by specifying `name != example-instance`. The `:` operator can be used with string fields to match substrings. For non-string fields it is equivalent to the `=` operator. The `:*` comparison can be used to test whether a key has been defined. For example, to find all objects with `owner` label use: ``` labels.owner:* ``` You can also filter nested fields. For example, you could specify `scheduling.automaticRestart = false` to include instances only if they are not scheduled for automatic restarts. You can use filtering on nested fields to filter based on resource labels. To filter on multiple expressions, provide each separate expression within parentheses. For example: ``` (scheduling.automaticRestart = true) (cpuPlatform = \"Intel Skylake\") ``` By default, each expression is an `AND` expression. However, you can include `AND` and `OR` expressions explicitly. For example: ``` (cpuPlatform = \"Intel Skylake\") OR (cpuPlatform = \"Intel Broadwell\") AND (scheduling.automaticRestart = true) ``` If you want to use a regular expression, use the `eq` (equal) or `ne` (not equal) operator against a single un-parenthesized expression with or without quotes or against multiple parenthesized expressions. Examples: `fieldname eq unquoted literal` `fieldname eq 'single quoted literal'` `fieldname eq \"double quoted literal\"` `(fieldname1 eq literal) (fieldname2 ne \"literal\")` The literal value is interpreted as a regular expression using Google RE2 library syntax. The literal value must match the entire field. For example, to filter for instances that do not end with name \"instance\", you would use `name ne .*instance`.", + "description": "A filter expression that filters resources listed in the response. Most Compute resources support two types of filter expressions: expressions that support regular expressions and expressions that follow API improvement proposal AIP-160. These two types of filter expressions cannot be mixed in one request. If you want to use AIP-160, your expression must specify the field name, an operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The operator must be either `=`, `!=`, `\u003e`, `\u003c`, `\u003c=`, `\u003e=` or `:`. For example, if you are filtering Compute Engine instances, you can exclude instances named `example-instance` by specifying `name != example-instance`. The `:*` comparison can be used to test whether a key has been defined. For example, to find all objects with `owner` label use: ``` labels.owner:* ``` You can also filter nested fields. For example, you could specify `scheduling.automaticRestart = false` to include instances only if they are not scheduled for automatic restarts. You can use filtering on nested fields to filter based on resource labels. To filter on multiple expressions, provide each separate expression within parentheses. For example: ``` (scheduling.automaticRestart = true) (cpuPlatform = \"Intel Skylake\") ``` By default, each expression is an `AND` expression. However, you can include `AND` and `OR` expressions explicitly. For example: ``` (cpuPlatform = \"Intel Skylake\") OR (cpuPlatform = \"Intel Broadwell\") AND (scheduling.automaticRestart = true) ``` If you want to use a regular expression, use the `eq` (equal) or `ne` (not equal) operator against a single un-parenthesized expression with or without quotes or against multiple parenthesized expressions. Examples: `fieldname eq unquoted literal` `fieldname eq 'single quoted literal'` `fieldname eq \"double quoted literal\"` `(fieldname1 eq literal) (fieldname2 ne \"literal\")` The literal value is interpreted as a regular expression using Google RE2 library syntax. The literal value must match the entire field. For example, to filter for instances that do not end with name \"instance\", you would use `name ne .*instance`. You cannot combine constraints on multiple fields using regular expressions.", "location": "query", "type": "string" }, @@ -1017,7 +1017,7 @@ ], "parameters": { "filter": { - "description": "A filter expression that filters resources listed in the response. Most Compute resources support two types of filter expressions: expressions that support regular expressions and expressions that follow API improvement proposal AIP-160. If you want to use AIP-160, your expression must specify the field name, an operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The operator must be either `=`, `!=`, `\u003e`, `\u003c`, `\u003c=`, `\u003e=` or `:`. For example, if you are filtering Compute Engine instances, you can exclude instances named `example-instance` by specifying `name != example-instance`. The `:` operator can be used with string fields to match substrings. For non-string fields it is equivalent to the `=` operator. The `:*` comparison can be used to test whether a key has been defined. For example, to find all objects with `owner` label use: ``` labels.owner:* ``` You can also filter nested fields. For example, you could specify `scheduling.automaticRestart = false` to include instances only if they are not scheduled for automatic restarts. You can use filtering on nested fields to filter based on resource labels. To filter on multiple expressions, provide each separate expression within parentheses. For example: ``` (scheduling.automaticRestart = true) (cpuPlatform = \"Intel Skylake\") ``` By default, each expression is an `AND` expression. However, you can include `AND` and `OR` expressions explicitly. For example: ``` (cpuPlatform = \"Intel Skylake\") OR (cpuPlatform = \"Intel Broadwell\") AND (scheduling.automaticRestart = true) ``` If you want to use a regular expression, use the `eq` (equal) or `ne` (not equal) operator against a single un-parenthesized expression with or without quotes or against multiple parenthesized expressions. Examples: `fieldname eq unquoted literal` `fieldname eq 'single quoted literal'` `fieldname eq \"double quoted literal\"` `(fieldname1 eq literal) (fieldname2 ne \"literal\")` The literal value is interpreted as a regular expression using Google RE2 library syntax. The literal value must match the entire field. For example, to filter for instances that do not end with name \"instance\", you would use `name ne .*instance`.", + "description": "A filter expression that filters resources listed in the response. Most Compute resources support two types of filter expressions: expressions that support regular expressions and expressions that follow API improvement proposal AIP-160. These two types of filter expressions cannot be mixed in one request. If you want to use AIP-160, your expression must specify the field name, an operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The operator must be either `=`, `!=`, `\u003e`, `\u003c`, `\u003c=`, `\u003e=` or `:`. For example, if you are filtering Compute Engine instances, you can exclude instances named `example-instance` by specifying `name != example-instance`. The `:*` comparison can be used to test whether a key has been defined. For example, to find all objects with `owner` label use: ``` labels.owner:* ``` You can also filter nested fields. For example, you could specify `scheduling.automaticRestart = false` to include instances only if they are not scheduled for automatic restarts. You can use filtering on nested fields to filter based on resource labels. To filter on multiple expressions, provide each separate expression within parentheses. For example: ``` (scheduling.automaticRestart = true) (cpuPlatform = \"Intel Skylake\") ``` By default, each expression is an `AND` expression. However, you can include `AND` and `OR` expressions explicitly. For example: ``` (cpuPlatform = \"Intel Skylake\") OR (cpuPlatform = \"Intel Broadwell\") AND (scheduling.automaticRestart = true) ``` If you want to use a regular expression, use the `eq` (equal) or `ne` (not equal) operator against a single un-parenthesized expression with or without quotes or against multiple parenthesized expressions. Examples: `fieldname eq unquoted literal` `fieldname eq 'single quoted literal'` `fieldname eq \"double quoted literal\"` `(fieldname1 eq literal) (fieldname2 ne \"literal\")` The literal value is interpreted as a regular expression using Google RE2 library syntax. The literal value must match the entire field. For example, to filter for instances that do not end with name \"instance\", you would use `name ne .*instance`. You cannot combine constraints on multiple fields using regular expressions.", "location": "query", "type": "string" }, @@ -1123,7 +1123,7 @@ "type": "string" }, "filter": { - "description": "A filter expression that filters resources listed in the response. Most Compute resources support two types of filter expressions: expressions that support regular expressions and expressions that follow API improvement proposal AIP-160. If you want to use AIP-160, your expression must specify the field name, an operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The operator must be either `=`, `!=`, `\u003e`, `\u003c`, `\u003c=`, `\u003e=` or `:`. For example, if you are filtering Compute Engine instances, you can exclude instances named `example-instance` by specifying `name != example-instance`. The `:` operator can be used with string fields to match substrings. For non-string fields it is equivalent to the `=` operator. The `:*` comparison can be used to test whether a key has been defined. For example, to find all objects with `owner` label use: ``` labels.owner:* ``` You can also filter nested fields. For example, you could specify `scheduling.automaticRestart = false` to include instances only if they are not scheduled for automatic restarts. You can use filtering on nested fields to filter based on resource labels. To filter on multiple expressions, provide each separate expression within parentheses. For example: ``` (scheduling.automaticRestart = true) (cpuPlatform = \"Intel Skylake\") ``` By default, each expression is an `AND` expression. However, you can include `AND` and `OR` expressions explicitly. For example: ``` (cpuPlatform = \"Intel Skylake\") OR (cpuPlatform = \"Intel Broadwell\") AND (scheduling.automaticRestart = true) ``` If you want to use a regular expression, use the `eq` (equal) or `ne` (not equal) operator against a single un-parenthesized expression with or without quotes or against multiple parenthesized expressions. Examples: `fieldname eq unquoted literal` `fieldname eq 'single quoted literal'` `fieldname eq \"double quoted literal\"` `(fieldname1 eq literal) (fieldname2 ne \"literal\")` The literal value is interpreted as a regular expression using Google RE2 library syntax. The literal value must match the entire field. For example, to filter for instances that do not end with name \"instance\", you would use `name ne .*instance`.", + "description": "A filter expression that filters resources listed in the response. Most Compute resources support two types of filter expressions: expressions that support regular expressions and expressions that follow API improvement proposal AIP-160. These two types of filter expressions cannot be mixed in one request. If you want to use AIP-160, your expression must specify the field name, an operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The operator must be either `=`, `!=`, `\u003e`, `\u003c`, `\u003c=`, `\u003e=` or `:`. For example, if you are filtering Compute Engine instances, you can exclude instances named `example-instance` by specifying `name != example-instance`. The `:*` comparison can be used to test whether a key has been defined. For example, to find all objects with `owner` label use: ``` labels.owner:* ``` You can also filter nested fields. For example, you could specify `scheduling.automaticRestart = false` to include instances only if they are not scheduled for automatic restarts. You can use filtering on nested fields to filter based on resource labels. To filter on multiple expressions, provide each separate expression within parentheses. For example: ``` (scheduling.automaticRestart = true) (cpuPlatform = \"Intel Skylake\") ``` By default, each expression is an `AND` expression. However, you can include `AND` and `OR` expressions explicitly. For example: ``` (cpuPlatform = \"Intel Skylake\") OR (cpuPlatform = \"Intel Broadwell\") AND (scheduling.automaticRestart = true) ``` If you want to use a regular expression, use the `eq` (equal) or `ne` (not equal) operator against a single un-parenthesized expression with or without quotes or against multiple parenthesized expressions. Examples: `fieldname eq unquoted literal` `fieldname eq 'single quoted literal'` `fieldname eq \"double quoted literal\"` `(fieldname1 eq literal) (fieldname2 ne \"literal\")` The literal value is interpreted as a regular expression using Google RE2 library syntax. The literal value must match the entire field. For example, to filter for instances that do not end with name \"instance\", you would use `name ne .*instance`. You cannot combine constraints on multiple fields using regular expressions.", "location": "query", "type": "string" }, @@ -1320,7 +1320,7 @@ ], "parameters": { "filter": { - "description": "A filter expression that filters resources listed in the response. Most Compute resources support two types of filter expressions: expressions that support regular expressions and expressions that follow API improvement proposal AIP-160. If you want to use AIP-160, your expression must specify the field name, an operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The operator must be either `=`, `!=`, `\u003e`, `\u003c`, `\u003c=`, `\u003e=` or `:`. For example, if you are filtering Compute Engine instances, you can exclude instances named `example-instance` by specifying `name != example-instance`. The `:` operator can be used with string fields to match substrings. For non-string fields it is equivalent to the `=` operator. The `:*` comparison can be used to test whether a key has been defined. For example, to find all objects with `owner` label use: ``` labels.owner:* ``` You can also filter nested fields. For example, you could specify `scheduling.automaticRestart = false` to include instances only if they are not scheduled for automatic restarts. You can use filtering on nested fields to filter based on resource labels. To filter on multiple expressions, provide each separate expression within parentheses. For example: ``` (scheduling.automaticRestart = true) (cpuPlatform = \"Intel Skylake\") ``` By default, each expression is an `AND` expression. However, you can include `AND` and `OR` expressions explicitly. For example: ``` (cpuPlatform = \"Intel Skylake\") OR (cpuPlatform = \"Intel Broadwell\") AND (scheduling.automaticRestart = true) ``` If you want to use a regular expression, use the `eq` (equal) or `ne` (not equal) operator against a single un-parenthesized expression with or without quotes or against multiple parenthesized expressions. Examples: `fieldname eq unquoted literal` `fieldname eq 'single quoted literal'` `fieldname eq \"double quoted literal\"` `(fieldname1 eq literal) (fieldname2 ne \"literal\")` The literal value is interpreted as a regular expression using Google RE2 library syntax. The literal value must match the entire field. For example, to filter for instances that do not end with name \"instance\", you would use `name ne .*instance`.", + "description": "A filter expression that filters resources listed in the response. Most Compute resources support two types of filter expressions: expressions that support regular expressions and expressions that follow API improvement proposal AIP-160. These two types of filter expressions cannot be mixed in one request. If you want to use AIP-160, your expression must specify the field name, an operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The operator must be either `=`, `!=`, `\u003e`, `\u003c`, `\u003c=`, `\u003e=` or `:`. For example, if you are filtering Compute Engine instances, you can exclude instances named `example-instance` by specifying `name != example-instance`. The `:*` comparison can be used to test whether a key has been defined. For example, to find all objects with `owner` label use: ``` labels.owner:* ``` You can also filter nested fields. For example, you could specify `scheduling.automaticRestart = false` to include instances only if they are not scheduled for automatic restarts. You can use filtering on nested fields to filter based on resource labels. To filter on multiple expressions, provide each separate expression within parentheses. For example: ``` (scheduling.automaticRestart = true) (cpuPlatform = \"Intel Skylake\") ``` By default, each expression is an `AND` expression. However, you can include `AND` and `OR` expressions explicitly. For example: ``` (cpuPlatform = \"Intel Skylake\") OR (cpuPlatform = \"Intel Broadwell\") AND (scheduling.automaticRestart = true) ``` If you want to use a regular expression, use the `eq` (equal) or `ne` (not equal) operator against a single un-parenthesized expression with or without quotes or against multiple parenthesized expressions. Examples: `fieldname eq unquoted literal` `fieldname eq 'single quoted literal'` `fieldname eq \"double quoted literal\"` `(fieldname1 eq literal) (fieldname2 ne \"literal\")` The literal value is interpreted as a regular expression using Google RE2 library syntax. The literal value must match the entire field. For example, to filter for instances that do not end with name \"instance\", you would use `name ne .*instance`. You cannot combine constraints on multiple fields using regular expressions.", "location": "query", "type": "string" }, @@ -1372,7 +1372,7 @@ ], "parameters": { "filter": { - "description": "A filter expression that filters resources listed in the response. Most Compute resources support two types of filter expressions: expressions that support regular expressions and expressions that follow API improvement proposal AIP-160. If you want to use AIP-160, your expression must specify the field name, an operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The operator must be either `=`, `!=`, `\u003e`, `\u003c`, `\u003c=`, `\u003e=` or `:`. For example, if you are filtering Compute Engine instances, you can exclude instances named `example-instance` by specifying `name != example-instance`. The `:` operator can be used with string fields to match substrings. For non-string fields it is equivalent to the `=` operator. The `:*` comparison can be used to test whether a key has been defined. For example, to find all objects with `owner` label use: ``` labels.owner:* ``` You can also filter nested fields. For example, you could specify `scheduling.automaticRestart = false` to include instances only if they are not scheduled for automatic restarts. You can use filtering on nested fields to filter based on resource labels. To filter on multiple expressions, provide each separate expression within parentheses. For example: ``` (scheduling.automaticRestart = true) (cpuPlatform = \"Intel Skylake\") ``` By default, each expression is an `AND` expression. However, you can include `AND` and `OR` expressions explicitly. For example: ``` (cpuPlatform = \"Intel Skylake\") OR (cpuPlatform = \"Intel Broadwell\") AND (scheduling.automaticRestart = true) ``` If you want to use a regular expression, use the `eq` (equal) or `ne` (not equal) operator against a single un-parenthesized expression with or without quotes or against multiple parenthesized expressions. Examples: `fieldname eq unquoted literal` `fieldname eq 'single quoted literal'` `fieldname eq \"double quoted literal\"` `(fieldname1 eq literal) (fieldname2 ne \"literal\")` The literal value is interpreted as a regular expression using Google RE2 library syntax. The literal value must match the entire field. For example, to filter for instances that do not end with name \"instance\", you would use `name ne .*instance`.", + "description": "A filter expression that filters resources listed in the response. Most Compute resources support two types of filter expressions: expressions that support regular expressions and expressions that follow API improvement proposal AIP-160. These two types of filter expressions cannot be mixed in one request. If you want to use AIP-160, your expression must specify the field name, an operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The operator must be either `=`, `!=`, `\u003e`, `\u003c`, `\u003c=`, `\u003e=` or `:`. For example, if you are filtering Compute Engine instances, you can exclude instances named `example-instance` by specifying `name != example-instance`. The `:*` comparison can be used to test whether a key has been defined. For example, to find all objects with `owner` label use: ``` labels.owner:* ``` You can also filter nested fields. For example, you could specify `scheduling.automaticRestart = false` to include instances only if they are not scheduled for automatic restarts. You can use filtering on nested fields to filter based on resource labels. To filter on multiple expressions, provide each separate expression within parentheses. For example: ``` (scheduling.automaticRestart = true) (cpuPlatform = \"Intel Skylake\") ``` By default, each expression is an `AND` expression. However, you can include `AND` and `OR` expressions explicitly. For example: ``` (cpuPlatform = \"Intel Skylake\") OR (cpuPlatform = \"Intel Broadwell\") AND (scheduling.automaticRestart = true) ``` If you want to use a regular expression, use the `eq` (equal) or `ne` (not equal) operator against a single un-parenthesized expression with or without quotes or against multiple parenthesized expressions. Examples: `fieldname eq unquoted literal` `fieldname eq 'single quoted literal'` `fieldname eq \"double quoted literal\"` `(fieldname1 eq literal) (fieldname2 ne \"literal\")` The literal value is interpreted as a regular expression using Google RE2 library syntax. The literal value must match the entire field. For example, to filter for instances that do not end with name \"instance\", you would use `name ne .*instance`. You cannot combine constraints on multiple fields using regular expressions.", "location": "query", "type": "string" }, @@ -1544,7 +1544,7 @@ ], "parameters": { "filter": { - "description": "A filter expression that filters resources listed in the response. Most Compute resources support two types of filter expressions: expressions that support regular expressions and expressions that follow API improvement proposal AIP-160. If you want to use AIP-160, your expression must specify the field name, an operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The operator must be either `=`, `!=`, `\u003e`, `\u003c`, `\u003c=`, `\u003e=` or `:`. For example, if you are filtering Compute Engine instances, you can exclude instances named `example-instance` by specifying `name != example-instance`. The `:` operator can be used with string fields to match substrings. For non-string fields it is equivalent to the `=` operator. The `:*` comparison can be used to test whether a key has been defined. For example, to find all objects with `owner` label use: ``` labels.owner:* ``` You can also filter nested fields. For example, you could specify `scheduling.automaticRestart = false` to include instances only if they are not scheduled for automatic restarts. You can use filtering on nested fields to filter based on resource labels. To filter on multiple expressions, provide each separate expression within parentheses. For example: ``` (scheduling.automaticRestart = true) (cpuPlatform = \"Intel Skylake\") ``` By default, each expression is an `AND` expression. However, you can include `AND` and `OR` expressions explicitly. For example: ``` (cpuPlatform = \"Intel Skylake\") OR (cpuPlatform = \"Intel Broadwell\") AND (scheduling.automaticRestart = true) ``` If you want to use a regular expression, use the `eq` (equal) or `ne` (not equal) operator against a single un-parenthesized expression with or without quotes or against multiple parenthesized expressions. Examples: `fieldname eq unquoted literal` `fieldname eq 'single quoted literal'` `fieldname eq \"double quoted literal\"` `(fieldname1 eq literal) (fieldname2 ne \"literal\")` The literal value is interpreted as a regular expression using Google RE2 library syntax. The literal value must match the entire field. For example, to filter for instances that do not end with name \"instance\", you would use `name ne .*instance`.", + "description": "A filter expression that filters resources listed in the response. Most Compute resources support two types of filter expressions: expressions that support regular expressions and expressions that follow API improvement proposal AIP-160. These two types of filter expressions cannot be mixed in one request. If you want to use AIP-160, your expression must specify the field name, an operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The operator must be either `=`, `!=`, `\u003e`, `\u003c`, `\u003c=`, `\u003e=` or `:`. For example, if you are filtering Compute Engine instances, you can exclude instances named `example-instance` by specifying `name != example-instance`. The `:*` comparison can be used to test whether a key has been defined. For example, to find all objects with `owner` label use: ``` labels.owner:* ``` You can also filter nested fields. For example, you could specify `scheduling.automaticRestart = false` to include instances only if they are not scheduled for automatic restarts. You can use filtering on nested fields to filter based on resource labels. To filter on multiple expressions, provide each separate expression within parentheses. For example: ``` (scheduling.automaticRestart = true) (cpuPlatform = \"Intel Skylake\") ``` By default, each expression is an `AND` expression. However, you can include `AND` and `OR` expressions explicitly. For example: ``` (cpuPlatform = \"Intel Skylake\") OR (cpuPlatform = \"Intel Broadwell\") AND (scheduling.automaticRestart = true) ``` If you want to use a regular expression, use the `eq` (equal) or `ne` (not equal) operator against a single un-parenthesized expression with or without quotes or against multiple parenthesized expressions. Examples: `fieldname eq unquoted literal` `fieldname eq 'single quoted literal'` `fieldname eq \"double quoted literal\"` `(fieldname1 eq literal) (fieldname2 ne \"literal\")` The literal value is interpreted as a regular expression using Google RE2 library syntax. The literal value must match the entire field. For example, to filter for instances that do not end with name \"instance\", you would use `name ne .*instance`. You cannot combine constraints on multiple fields using regular expressions.", "location": "query", "type": "string" }, @@ -1588,7 +1588,7 @@ } } }, - "revision": "20230829", + "revision": "20230921", "rootUrl": "https://deploymentmanager.googleapis.com/", "schemas": { "AsyncOptions": { diff --git a/deploymentmanager/v0.alpha/deploymentmanager-gen.go b/deploymentmanager/v0.alpha/deploymentmanager-gen.go index 115c59df8c2..153e376ee18 100644 --- a/deploymentmanager/v0.alpha/deploymentmanager-gen.go +++ b/deploymentmanager/v0.alpha/deploymentmanager-gen.go @@ -3936,22 +3936,21 @@ func (r *CompositeTypesService) List(project string) *CompositeTypesListCall { // filters resources listed in the response. Most Compute resources // support two types of filter expressions: expressions that support // regular expressions and expressions that follow API improvement -// proposal AIP-160. If you want to use AIP-160, your expression must -// specify the field name, an operator, and the value that you want to -// use for filtering. The value must be a string, a number, or a +// proposal AIP-160. These two types of filter expressions cannot be +// mixed in one request. If you want to use AIP-160, your expression +// must specify the field name, an operator, and the value that you want +// to use for filtering. The value must be a string, a number, or a // boolean. The operator must be either `=`, `!=`, `>`, `<`, `<=`, `>=` // or `:`. For example, if you are filtering Compute Engine instances, // you can exclude instances named `example-instance` by specifying -// `name != example-instance`. The `:` operator can be used with string -// fields to match substrings. For non-string fields it is equivalent to -// the `=` operator. The `:*` comparison can be used to test whether a -// key has been defined. For example, to find all objects with `owner` -// label use: ``` labels.owner:* ``` You can also filter nested fields. -// For example, you could specify `scheduling.automaticRestart = false` -// to include instances only if they are not scheduled for automatic -// restarts. You can use filtering on nested fields to filter based on -// resource labels. To filter on multiple expressions, provide each -// separate expression within parentheses. For example: ``` +// `name != example-instance`. The `:*` comparison can be used to test +// whether a key has been defined. For example, to find all objects with +// `owner` label use: ``` labels.owner:* ``` You can also filter nested +// fields. For example, you could specify `scheduling.automaticRestart = +// false` to include instances only if they are not scheduled for +// automatic restarts. You can use filtering on nested fields to filter +// based on resource labels. To filter on multiple expressions, provide +// each separate expression within parentheses. For example: ``` // (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") // ``` By default, each expression is an `AND` expression. However, you // can include `AND` and `OR` expressions explicitly. For example: ``` @@ -3966,7 +3965,8 @@ func (r *CompositeTypesService) List(project string) *CompositeTypesListCall { // regular expression using Google RE2 library syntax. The literal value // must match the entire field. For example, to filter for instances // that do not end with name "instance", you would use `name ne -// .*instance`. +// .*instance`. You cannot combine constraints on multiple fields using +// regular expressions. func (c *CompositeTypesListCall) Filter(filter string) *CompositeTypesListCall { c.urlParams_.Set("filter", filter) return c @@ -4113,7 +4113,7 @@ func (c *CompositeTypesListCall) Do(opts ...googleapi.CallOption) (*CompositeTyp // ], // "parameters": { // "filter": { - // "description": "A filter expression that filters resources listed in the response. Most Compute resources support two types of filter expressions: expressions that support regular expressions and expressions that follow API improvement proposal AIP-160. If you want to use AIP-160, your expression must specify the field name, an operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The operator must be either `=`, `!=`, `\u003e`, `\u003c`, `\u003c=`, `\u003e=` or `:`. For example, if you are filtering Compute Engine instances, you can exclude instances named `example-instance` by specifying `name != example-instance`. The `:` operator can be used with string fields to match substrings. For non-string fields it is equivalent to the `=` operator. The `:*` comparison can be used to test whether a key has been defined. For example, to find all objects with `owner` label use: ``` labels.owner:* ``` You can also filter nested fields. For example, you could specify `scheduling.automaticRestart = false` to include instances only if they are not scheduled for automatic restarts. You can use filtering on nested fields to filter based on resource labels. To filter on multiple expressions, provide each separate expression within parentheses. For example: ``` (scheduling.automaticRestart = true) (cpuPlatform = \"Intel Skylake\") ``` By default, each expression is an `AND` expression. However, you can include `AND` and `OR` expressions explicitly. For example: ``` (cpuPlatform = \"Intel Skylake\") OR (cpuPlatform = \"Intel Broadwell\") AND (scheduling.automaticRestart = true) ``` If you want to use a regular expression, use the `eq` (equal) or `ne` (not equal) operator against a single un-parenthesized expression with or without quotes or against multiple parenthesized expressions. Examples: `fieldname eq unquoted literal` `fieldname eq 'single quoted literal'` `fieldname eq \"double quoted literal\"` `(fieldname1 eq literal) (fieldname2 ne \"literal\")` The literal value is interpreted as a regular expression using Google RE2 library syntax. The literal value must match the entire field. For example, to filter for instances that do not end with name \"instance\", you would use `name ne .*instance`.", + // "description": "A filter expression that filters resources listed in the response. Most Compute resources support two types of filter expressions: expressions that support regular expressions and expressions that follow API improvement proposal AIP-160. These two types of filter expressions cannot be mixed in one request. If you want to use AIP-160, your expression must specify the field name, an operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The operator must be either `=`, `!=`, `\u003e`, `\u003c`, `\u003c=`, `\u003e=` or `:`. For example, if you are filtering Compute Engine instances, you can exclude instances named `example-instance` by specifying `name != example-instance`. The `:*` comparison can be used to test whether a key has been defined. For example, to find all objects with `owner` label use: ``` labels.owner:* ``` You can also filter nested fields. For example, you could specify `scheduling.automaticRestart = false` to include instances only if they are not scheduled for automatic restarts. You can use filtering on nested fields to filter based on resource labels. To filter on multiple expressions, provide each separate expression within parentheses. For example: ``` (scheduling.automaticRestart = true) (cpuPlatform = \"Intel Skylake\") ``` By default, each expression is an `AND` expression. However, you can include `AND` and `OR` expressions explicitly. For example: ``` (cpuPlatform = \"Intel Skylake\") OR (cpuPlatform = \"Intel Broadwell\") AND (scheduling.automaticRestart = true) ``` If you want to use a regular expression, use the `eq` (equal) or `ne` (not equal) operator against a single un-parenthesized expression with or without quotes or against multiple parenthesized expressions. Examples: `fieldname eq unquoted literal` `fieldname eq 'single quoted literal'` `fieldname eq \"double quoted literal\"` `(fieldname1 eq literal) (fieldname2 ne \"literal\")` The literal value is interpreted as a regular expression using Google RE2 library syntax. The literal value must match the entire field. For example, to filter for instances that do not end with name \"instance\", you would use `name ne .*instance`. You cannot combine constraints on multiple fields using regular expressions.", // "location": "query", // "type": "string" // }, @@ -5365,22 +5365,21 @@ func (r *DeploymentsService) List(project string) *DeploymentsListCall { // filters resources listed in the response. Most Compute resources // support two types of filter expressions: expressions that support // regular expressions and expressions that follow API improvement -// proposal AIP-160. If you want to use AIP-160, your expression must -// specify the field name, an operator, and the value that you want to -// use for filtering. The value must be a string, a number, or a +// proposal AIP-160. These two types of filter expressions cannot be +// mixed in one request. If you want to use AIP-160, your expression +// must specify the field name, an operator, and the value that you want +// to use for filtering. The value must be a string, a number, or a // boolean. The operator must be either `=`, `!=`, `>`, `<`, `<=`, `>=` // or `:`. For example, if you are filtering Compute Engine instances, // you can exclude instances named `example-instance` by specifying -// `name != example-instance`. The `:` operator can be used with string -// fields to match substrings. For non-string fields it is equivalent to -// the `=` operator. The `:*` comparison can be used to test whether a -// key has been defined. For example, to find all objects with `owner` -// label use: ``` labels.owner:* ``` You can also filter nested fields. -// For example, you could specify `scheduling.automaticRestart = false` -// to include instances only if they are not scheduled for automatic -// restarts. You can use filtering on nested fields to filter based on -// resource labels. To filter on multiple expressions, provide each -// separate expression within parentheses. For example: ``` +// `name != example-instance`. The `:*` comparison can be used to test +// whether a key has been defined. For example, to find all objects with +// `owner` label use: ``` labels.owner:* ``` You can also filter nested +// fields. For example, you could specify `scheduling.automaticRestart = +// false` to include instances only if they are not scheduled for +// automatic restarts. You can use filtering on nested fields to filter +// based on resource labels. To filter on multiple expressions, provide +// each separate expression within parentheses. For example: ``` // (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") // ``` By default, each expression is an `AND` expression. However, you // can include `AND` and `OR` expressions explicitly. For example: ``` @@ -5395,7 +5394,8 @@ func (r *DeploymentsService) List(project string) *DeploymentsListCall { // regular expression using Google RE2 library syntax. The literal value // must match the entire field. For example, to filter for instances // that do not end with name "instance", you would use `name ne -// .*instance`. +// .*instance`. You cannot combine constraints on multiple fields using +// regular expressions. func (c *DeploymentsListCall) Filter(filter string) *DeploymentsListCall { c.urlParams_.Set("filter", filter) return c @@ -5542,7 +5542,7 @@ func (c *DeploymentsListCall) Do(opts ...googleapi.CallOption) (*DeploymentsList // ], // "parameters": { // "filter": { - // "description": "A filter expression that filters resources listed in the response. Most Compute resources support two types of filter expressions: expressions that support regular expressions and expressions that follow API improvement proposal AIP-160. If you want to use AIP-160, your expression must specify the field name, an operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The operator must be either `=`, `!=`, `\u003e`, `\u003c`, `\u003c=`, `\u003e=` or `:`. For example, if you are filtering Compute Engine instances, you can exclude instances named `example-instance` by specifying `name != example-instance`. The `:` operator can be used with string fields to match substrings. For non-string fields it is equivalent to the `=` operator. The `:*` comparison can be used to test whether a key has been defined. For example, to find all objects with `owner` label use: ``` labels.owner:* ``` You can also filter nested fields. For example, you could specify `scheduling.automaticRestart = false` to include instances only if they are not scheduled for automatic restarts. You can use filtering on nested fields to filter based on resource labels. To filter on multiple expressions, provide each separate expression within parentheses. For example: ``` (scheduling.automaticRestart = true) (cpuPlatform = \"Intel Skylake\") ``` By default, each expression is an `AND` expression. However, you can include `AND` and `OR` expressions explicitly. For example: ``` (cpuPlatform = \"Intel Skylake\") OR (cpuPlatform = \"Intel Broadwell\") AND (scheduling.automaticRestart = true) ``` If you want to use a regular expression, use the `eq` (equal) or `ne` (not equal) operator against a single un-parenthesized expression with or without quotes or against multiple parenthesized expressions. Examples: `fieldname eq unquoted literal` `fieldname eq 'single quoted literal'` `fieldname eq \"double quoted literal\"` `(fieldname1 eq literal) (fieldname2 ne \"literal\")` The literal value is interpreted as a regular expression using Google RE2 library syntax. The literal value must match the entire field. For example, to filter for instances that do not end with name \"instance\", you would use `name ne .*instance`.", + // "description": "A filter expression that filters resources listed in the response. Most Compute resources support two types of filter expressions: expressions that support regular expressions and expressions that follow API improvement proposal AIP-160. These two types of filter expressions cannot be mixed in one request. If you want to use AIP-160, your expression must specify the field name, an operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The operator must be either `=`, `!=`, `\u003e`, `\u003c`, `\u003c=`, `\u003e=` or `:`. For example, if you are filtering Compute Engine instances, you can exclude instances named `example-instance` by specifying `name != example-instance`. The `:*` comparison can be used to test whether a key has been defined. For example, to find all objects with `owner` label use: ``` labels.owner:* ``` You can also filter nested fields. For example, you could specify `scheduling.automaticRestart = false` to include instances only if they are not scheduled for automatic restarts. You can use filtering on nested fields to filter based on resource labels. To filter on multiple expressions, provide each separate expression within parentheses. For example: ``` (scheduling.automaticRestart = true) (cpuPlatform = \"Intel Skylake\") ``` By default, each expression is an `AND` expression. However, you can include `AND` and `OR` expressions explicitly. For example: ``` (cpuPlatform = \"Intel Skylake\") OR (cpuPlatform = \"Intel Broadwell\") AND (scheduling.automaticRestart = true) ``` If you want to use a regular expression, use the `eq` (equal) or `ne` (not equal) operator against a single un-parenthesized expression with or without quotes or against multiple parenthesized expressions. Examples: `fieldname eq unquoted literal` `fieldname eq 'single quoted literal'` `fieldname eq \"double quoted literal\"` `(fieldname1 eq literal) (fieldname2 ne \"literal\")` The literal value is interpreted as a regular expression using Google RE2 library syntax. The literal value must match the entire field. For example, to filter for instances that do not end with name \"instance\", you would use `name ne .*instance`. You cannot combine constraints on multiple fields using regular expressions.", // "location": "query", // "type": "string" // }, @@ -6742,22 +6742,21 @@ func (r *ManifestsService) List(project string, deployment string) *ManifestsLis // filters resources listed in the response. Most Compute resources // support two types of filter expressions: expressions that support // regular expressions and expressions that follow API improvement -// proposal AIP-160. If you want to use AIP-160, your expression must -// specify the field name, an operator, and the value that you want to -// use for filtering. The value must be a string, a number, or a +// proposal AIP-160. These two types of filter expressions cannot be +// mixed in one request. If you want to use AIP-160, your expression +// must specify the field name, an operator, and the value that you want +// to use for filtering. The value must be a string, a number, or a // boolean. The operator must be either `=`, `!=`, `>`, `<`, `<=`, `>=` // or `:`. For example, if you are filtering Compute Engine instances, // you can exclude instances named `example-instance` by specifying -// `name != example-instance`. The `:` operator can be used with string -// fields to match substrings. For non-string fields it is equivalent to -// the `=` operator. The `:*` comparison can be used to test whether a -// key has been defined. For example, to find all objects with `owner` -// label use: ``` labels.owner:* ``` You can also filter nested fields. -// For example, you could specify `scheduling.automaticRestart = false` -// to include instances only if they are not scheduled for automatic -// restarts. You can use filtering on nested fields to filter based on -// resource labels. To filter on multiple expressions, provide each -// separate expression within parentheses. For example: ``` +// `name != example-instance`. The `:*` comparison can be used to test +// whether a key has been defined. For example, to find all objects with +// `owner` label use: ``` labels.owner:* ``` You can also filter nested +// fields. For example, you could specify `scheduling.automaticRestart = +// false` to include instances only if they are not scheduled for +// automatic restarts. You can use filtering on nested fields to filter +// based on resource labels. To filter on multiple expressions, provide +// each separate expression within parentheses. For example: ``` // (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") // ``` By default, each expression is an `AND` expression. However, you // can include `AND` and `OR` expressions explicitly. For example: ``` @@ -6772,7 +6771,8 @@ func (r *ManifestsService) List(project string, deployment string) *ManifestsLis // regular expression using Google RE2 library syntax. The literal value // must match the entire field. For example, to filter for instances // that do not end with name "instance", you would use `name ne -// .*instance`. +// .*instance`. You cannot combine constraints on multiple fields using +// regular expressions. func (c *ManifestsListCall) Filter(filter string) *ManifestsListCall { c.urlParams_.Set("filter", filter) return c @@ -6928,7 +6928,7 @@ func (c *ManifestsListCall) Do(opts ...googleapi.CallOption) (*ManifestsListResp // "type": "string" // }, // "filter": { - // "description": "A filter expression that filters resources listed in the response. Most Compute resources support two types of filter expressions: expressions that support regular expressions and expressions that follow API improvement proposal AIP-160. If you want to use AIP-160, your expression must specify the field name, an operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The operator must be either `=`, `!=`, `\u003e`, `\u003c`, `\u003c=`, `\u003e=` or `:`. For example, if you are filtering Compute Engine instances, you can exclude instances named `example-instance` by specifying `name != example-instance`. The `:` operator can be used with string fields to match substrings. For non-string fields it is equivalent to the `=` operator. The `:*` comparison can be used to test whether a key has been defined. For example, to find all objects with `owner` label use: ``` labels.owner:* ``` You can also filter nested fields. For example, you could specify `scheduling.automaticRestart = false` to include instances only if they are not scheduled for automatic restarts. You can use filtering on nested fields to filter based on resource labels. To filter on multiple expressions, provide each separate expression within parentheses. For example: ``` (scheduling.automaticRestart = true) (cpuPlatform = \"Intel Skylake\") ``` By default, each expression is an `AND` expression. However, you can include `AND` and `OR` expressions explicitly. For example: ``` (cpuPlatform = \"Intel Skylake\") OR (cpuPlatform = \"Intel Broadwell\") AND (scheduling.automaticRestart = true) ``` If you want to use a regular expression, use the `eq` (equal) or `ne` (not equal) operator against a single un-parenthesized expression with or without quotes or against multiple parenthesized expressions. Examples: `fieldname eq unquoted literal` `fieldname eq 'single quoted literal'` `fieldname eq \"double quoted literal\"` `(fieldname1 eq literal) (fieldname2 ne \"literal\")` The literal value is interpreted as a regular expression using Google RE2 library syntax. The literal value must match the entire field. For example, to filter for instances that do not end with name \"instance\", you would use `name ne .*instance`.", + // "description": "A filter expression that filters resources listed in the response. Most Compute resources support two types of filter expressions: expressions that support regular expressions and expressions that follow API improvement proposal AIP-160. These two types of filter expressions cannot be mixed in one request. If you want to use AIP-160, your expression must specify the field name, an operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The operator must be either `=`, `!=`, `\u003e`, `\u003c`, `\u003c=`, `\u003e=` or `:`. For example, if you are filtering Compute Engine instances, you can exclude instances named `example-instance` by specifying `name != example-instance`. The `:*` comparison can be used to test whether a key has been defined. For example, to find all objects with `owner` label use: ``` labels.owner:* ``` You can also filter nested fields. For example, you could specify `scheduling.automaticRestart = false` to include instances only if they are not scheduled for automatic restarts. You can use filtering on nested fields to filter based on resource labels. To filter on multiple expressions, provide each separate expression within parentheses. For example: ``` (scheduling.automaticRestart = true) (cpuPlatform = \"Intel Skylake\") ``` By default, each expression is an `AND` expression. However, you can include `AND` and `OR` expressions explicitly. For example: ``` (cpuPlatform = \"Intel Skylake\") OR (cpuPlatform = \"Intel Broadwell\") AND (scheduling.automaticRestart = true) ``` If you want to use a regular expression, use the `eq` (equal) or `ne` (not equal) operator against a single un-parenthesized expression with or without quotes or against multiple parenthesized expressions. Examples: `fieldname eq unquoted literal` `fieldname eq 'single quoted literal'` `fieldname eq \"double quoted literal\"` `(fieldname1 eq literal) (fieldname2 ne \"literal\")` The literal value is interpreted as a regular expression using Google RE2 library syntax. The literal value must match the entire field. For example, to filter for instances that do not end with name \"instance\", you would use `name ne .*instance`. You cannot combine constraints on multiple fields using regular expressions.", // "location": "query", // "type": "string" // }, @@ -7177,22 +7177,21 @@ func (r *OperationsService) List(project string) *OperationsListCall { // filters resources listed in the response. Most Compute resources // support two types of filter expressions: expressions that support // regular expressions and expressions that follow API improvement -// proposal AIP-160. If you want to use AIP-160, your expression must -// specify the field name, an operator, and the value that you want to -// use for filtering. The value must be a string, a number, or a +// proposal AIP-160. These two types of filter expressions cannot be +// mixed in one request. If you want to use AIP-160, your expression +// must specify the field name, an operator, and the value that you want +// to use for filtering. The value must be a string, a number, or a // boolean. The operator must be either `=`, `!=`, `>`, `<`, `<=`, `>=` // or `:`. For example, if you are filtering Compute Engine instances, // you can exclude instances named `example-instance` by specifying -// `name != example-instance`. The `:` operator can be used with string -// fields to match substrings. For non-string fields it is equivalent to -// the `=` operator. The `:*` comparison can be used to test whether a -// key has been defined. For example, to find all objects with `owner` -// label use: ``` labels.owner:* ``` You can also filter nested fields. -// For example, you could specify `scheduling.automaticRestart = false` -// to include instances only if they are not scheduled for automatic -// restarts. You can use filtering on nested fields to filter based on -// resource labels. To filter on multiple expressions, provide each -// separate expression within parentheses. For example: ``` +// `name != example-instance`. The `:*` comparison can be used to test +// whether a key has been defined. For example, to find all objects with +// `owner` label use: ``` labels.owner:* ``` You can also filter nested +// fields. For example, you could specify `scheduling.automaticRestart = +// false` to include instances only if they are not scheduled for +// automatic restarts. You can use filtering on nested fields to filter +// based on resource labels. To filter on multiple expressions, provide +// each separate expression within parentheses. For example: ``` // (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") // ``` By default, each expression is an `AND` expression. However, you // can include `AND` and `OR` expressions explicitly. For example: ``` @@ -7207,7 +7206,8 @@ func (r *OperationsService) List(project string) *OperationsListCall { // regular expression using Google RE2 library syntax. The literal value // must match the entire field. For example, to filter for instances // that do not end with name "instance", you would use `name ne -// .*instance`. +// .*instance`. You cannot combine constraints on multiple fields using +// regular expressions. func (c *OperationsListCall) Filter(filter string) *OperationsListCall { c.urlParams_.Set("filter", filter) return c @@ -7354,7 +7354,7 @@ func (c *OperationsListCall) Do(opts ...googleapi.CallOption) (*OperationsListRe // ], // "parameters": { // "filter": { - // "description": "A filter expression that filters resources listed in the response. Most Compute resources support two types of filter expressions: expressions that support regular expressions and expressions that follow API improvement proposal AIP-160. If you want to use AIP-160, your expression must specify the field name, an operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The operator must be either `=`, `!=`, `\u003e`, `\u003c`, `\u003c=`, `\u003e=` or `:`. For example, if you are filtering Compute Engine instances, you can exclude instances named `example-instance` by specifying `name != example-instance`. The `:` operator can be used with string fields to match substrings. For non-string fields it is equivalent to the `=` operator. The `:*` comparison can be used to test whether a key has been defined. For example, to find all objects with `owner` label use: ``` labels.owner:* ``` You can also filter nested fields. For example, you could specify `scheduling.automaticRestart = false` to include instances only if they are not scheduled for automatic restarts. You can use filtering on nested fields to filter based on resource labels. To filter on multiple expressions, provide each separate expression within parentheses. For example: ``` (scheduling.automaticRestart = true) (cpuPlatform = \"Intel Skylake\") ``` By default, each expression is an `AND` expression. However, you can include `AND` and `OR` expressions explicitly. For example: ``` (cpuPlatform = \"Intel Skylake\") OR (cpuPlatform = \"Intel Broadwell\") AND (scheduling.automaticRestart = true) ``` If you want to use a regular expression, use the `eq` (equal) or `ne` (not equal) operator against a single un-parenthesized expression with or without quotes or against multiple parenthesized expressions. Examples: `fieldname eq unquoted literal` `fieldname eq 'single quoted literal'` `fieldname eq \"double quoted literal\"` `(fieldname1 eq literal) (fieldname2 ne \"literal\")` The literal value is interpreted as a regular expression using Google RE2 library syntax. The literal value must match the entire field. For example, to filter for instances that do not end with name \"instance\", you would use `name ne .*instance`.", + // "description": "A filter expression that filters resources listed in the response. Most Compute resources support two types of filter expressions: expressions that support regular expressions and expressions that follow API improvement proposal AIP-160. These two types of filter expressions cannot be mixed in one request. If you want to use AIP-160, your expression must specify the field name, an operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The operator must be either `=`, `!=`, `\u003e`, `\u003c`, `\u003c=`, `\u003e=` or `:`. For example, if you are filtering Compute Engine instances, you can exclude instances named `example-instance` by specifying `name != example-instance`. The `:*` comparison can be used to test whether a key has been defined. For example, to find all objects with `owner` label use: ``` labels.owner:* ``` You can also filter nested fields. For example, you could specify `scheduling.automaticRestart = false` to include instances only if they are not scheduled for automatic restarts. You can use filtering on nested fields to filter based on resource labels. To filter on multiple expressions, provide each separate expression within parentheses. For example: ``` (scheduling.automaticRestart = true) (cpuPlatform = \"Intel Skylake\") ``` By default, each expression is an `AND` expression. However, you can include `AND` and `OR` expressions explicitly. For example: ``` (cpuPlatform = \"Intel Skylake\") OR (cpuPlatform = \"Intel Broadwell\") AND (scheduling.automaticRestart = true) ``` If you want to use a regular expression, use the `eq` (equal) or `ne` (not equal) operator against a single un-parenthesized expression with or without quotes or against multiple parenthesized expressions. Examples: `fieldname eq unquoted literal` `fieldname eq 'single quoted literal'` `fieldname eq \"double quoted literal\"` `(fieldname1 eq literal) (fieldname2 ne \"literal\")` The literal value is interpreted as a regular expression using Google RE2 library syntax. The literal value must match the entire field. For example, to filter for instances that do not end with name \"instance\", you would use `name ne .*instance`. You cannot combine constraints on multiple fields using regular expressions.", // "location": "query", // "type": "string" // }, @@ -7618,22 +7618,21 @@ func (r *ResourcesService) List(project string, deployment string) *ResourcesLis // filters resources listed in the response. Most Compute resources // support two types of filter expressions: expressions that support // regular expressions and expressions that follow API improvement -// proposal AIP-160. If you want to use AIP-160, your expression must -// specify the field name, an operator, and the value that you want to -// use for filtering. The value must be a string, a number, or a +// proposal AIP-160. These two types of filter expressions cannot be +// mixed in one request. If you want to use AIP-160, your expression +// must specify the field name, an operator, and the value that you want +// to use for filtering. The value must be a string, a number, or a // boolean. The operator must be either `=`, `!=`, `>`, `<`, `<=`, `>=` // or `:`. For example, if you are filtering Compute Engine instances, // you can exclude instances named `example-instance` by specifying -// `name != example-instance`. The `:` operator can be used with string -// fields to match substrings. For non-string fields it is equivalent to -// the `=` operator. The `:*` comparison can be used to test whether a -// key has been defined. For example, to find all objects with `owner` -// label use: ``` labels.owner:* ``` You can also filter nested fields. -// For example, you could specify `scheduling.automaticRestart = false` -// to include instances only if they are not scheduled for automatic -// restarts. You can use filtering on nested fields to filter based on -// resource labels. To filter on multiple expressions, provide each -// separate expression within parentheses. For example: ``` +// `name != example-instance`. The `:*` comparison can be used to test +// whether a key has been defined. For example, to find all objects with +// `owner` label use: ``` labels.owner:* ``` You can also filter nested +// fields. For example, you could specify `scheduling.automaticRestart = +// false` to include instances only if they are not scheduled for +// automatic restarts. You can use filtering on nested fields to filter +// based on resource labels. To filter on multiple expressions, provide +// each separate expression within parentheses. For example: ``` // (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") // ``` By default, each expression is an `AND` expression. However, you // can include `AND` and `OR` expressions explicitly. For example: ``` @@ -7648,7 +7647,8 @@ func (r *ResourcesService) List(project string, deployment string) *ResourcesLis // regular expression using Google RE2 library syntax. The literal value // must match the entire field. For example, to filter for instances // that do not end with name "instance", you would use `name ne -// .*instance`. +// .*instance`. You cannot combine constraints on multiple fields using +// regular expressions. func (c *ResourcesListCall) Filter(filter string) *ResourcesListCall { c.urlParams_.Set("filter", filter) return c @@ -7804,7 +7804,7 @@ func (c *ResourcesListCall) Do(opts ...googleapi.CallOption) (*ResourcesListResp // "type": "string" // }, // "filter": { - // "description": "A filter expression that filters resources listed in the response. Most Compute resources support two types of filter expressions: expressions that support regular expressions and expressions that follow API improvement proposal AIP-160. If you want to use AIP-160, your expression must specify the field name, an operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The operator must be either `=`, `!=`, `\u003e`, `\u003c`, `\u003c=`, `\u003e=` or `:`. For example, if you are filtering Compute Engine instances, you can exclude instances named `example-instance` by specifying `name != example-instance`. The `:` operator can be used with string fields to match substrings. For non-string fields it is equivalent to the `=` operator. The `:*` comparison can be used to test whether a key has been defined. For example, to find all objects with `owner` label use: ``` labels.owner:* ``` You can also filter nested fields. For example, you could specify `scheduling.automaticRestart = false` to include instances only if they are not scheduled for automatic restarts. You can use filtering on nested fields to filter based on resource labels. To filter on multiple expressions, provide each separate expression within parentheses. For example: ``` (scheduling.automaticRestart = true) (cpuPlatform = \"Intel Skylake\") ``` By default, each expression is an `AND` expression. However, you can include `AND` and `OR` expressions explicitly. For example: ``` (cpuPlatform = \"Intel Skylake\") OR (cpuPlatform = \"Intel Broadwell\") AND (scheduling.automaticRestart = true) ``` If you want to use a regular expression, use the `eq` (equal) or `ne` (not equal) operator against a single un-parenthesized expression with or without quotes or against multiple parenthesized expressions. Examples: `fieldname eq unquoted literal` `fieldname eq 'single quoted literal'` `fieldname eq \"double quoted literal\"` `(fieldname1 eq literal) (fieldname2 ne \"literal\")` The literal value is interpreted as a regular expression using Google RE2 library syntax. The literal value must match the entire field. For example, to filter for instances that do not end with name \"instance\", you would use `name ne .*instance`.", + // "description": "A filter expression that filters resources listed in the response. Most Compute resources support two types of filter expressions: expressions that support regular expressions and expressions that follow API improvement proposal AIP-160. These two types of filter expressions cannot be mixed in one request. If you want to use AIP-160, your expression must specify the field name, an operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The operator must be either `=`, `!=`, `\u003e`, `\u003c`, `\u003c=`, `\u003e=` or `:`. For example, if you are filtering Compute Engine instances, you can exclude instances named `example-instance` by specifying `name != example-instance`. The `:*` comparison can be used to test whether a key has been defined. For example, to find all objects with `owner` label use: ``` labels.owner:* ``` You can also filter nested fields. For example, you could specify `scheduling.automaticRestart = false` to include instances only if they are not scheduled for automatic restarts. You can use filtering on nested fields to filter based on resource labels. To filter on multiple expressions, provide each separate expression within parentheses. For example: ``` (scheduling.automaticRestart = true) (cpuPlatform = \"Intel Skylake\") ``` By default, each expression is an `AND` expression. However, you can include `AND` and `OR` expressions explicitly. For example: ``` (cpuPlatform = \"Intel Skylake\") OR (cpuPlatform = \"Intel Broadwell\") AND (scheduling.automaticRestart = true) ``` If you want to use a regular expression, use the `eq` (equal) or `ne` (not equal) operator against a single un-parenthesized expression with or without quotes or against multiple parenthesized expressions. Examples: `fieldname eq unquoted literal` `fieldname eq 'single quoted literal'` `fieldname eq \"double quoted literal\"` `(fieldname1 eq literal) (fieldname2 ne \"literal\")` The literal value is interpreted as a regular expression using Google RE2 library syntax. The literal value must match the entire field. For example, to filter for instances that do not end with name \"instance\", you would use `name ne .*instance`. You cannot combine constraints on multiple fields using regular expressions.", // "location": "query", // "type": "string" // }, @@ -8514,22 +8514,21 @@ func (r *TypeProvidersService) List(project string) *TypeProvidersListCall { // filters resources listed in the response. Most Compute resources // support two types of filter expressions: expressions that support // regular expressions and expressions that follow API improvement -// proposal AIP-160. If you want to use AIP-160, your expression must -// specify the field name, an operator, and the value that you want to -// use for filtering. The value must be a string, a number, or a +// proposal AIP-160. These two types of filter expressions cannot be +// mixed in one request. If you want to use AIP-160, your expression +// must specify the field name, an operator, and the value that you want +// to use for filtering. The value must be a string, a number, or a // boolean. The operator must be either `=`, `!=`, `>`, `<`, `<=`, `>=` // or `:`. For example, if you are filtering Compute Engine instances, // you can exclude instances named `example-instance` by specifying -// `name != example-instance`. The `:` operator can be used with string -// fields to match substrings. For non-string fields it is equivalent to -// the `=` operator. The `:*` comparison can be used to test whether a -// key has been defined. For example, to find all objects with `owner` -// label use: ``` labels.owner:* ``` You can also filter nested fields. -// For example, you could specify `scheduling.automaticRestart = false` -// to include instances only if they are not scheduled for automatic -// restarts. You can use filtering on nested fields to filter based on -// resource labels. To filter on multiple expressions, provide each -// separate expression within parentheses. For example: ``` +// `name != example-instance`. The `:*` comparison can be used to test +// whether a key has been defined. For example, to find all objects with +// `owner` label use: ``` labels.owner:* ``` You can also filter nested +// fields. For example, you could specify `scheduling.automaticRestart = +// false` to include instances only if they are not scheduled for +// automatic restarts. You can use filtering on nested fields to filter +// based on resource labels. To filter on multiple expressions, provide +// each separate expression within parentheses. For example: ``` // (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") // ``` By default, each expression is an `AND` expression. However, you // can include `AND` and `OR` expressions explicitly. For example: ``` @@ -8544,7 +8543,8 @@ func (r *TypeProvidersService) List(project string) *TypeProvidersListCall { // regular expression using Google RE2 library syntax. The literal value // must match the entire field. For example, to filter for instances // that do not end with name "instance", you would use `name ne -// .*instance`. +// .*instance`. You cannot combine constraints on multiple fields using +// regular expressions. func (c *TypeProvidersListCall) Filter(filter string) *TypeProvidersListCall { c.urlParams_.Set("filter", filter) return c @@ -8691,7 +8691,7 @@ func (c *TypeProvidersListCall) Do(opts ...googleapi.CallOption) (*TypeProviders // ], // "parameters": { // "filter": { - // "description": "A filter expression that filters resources listed in the response. Most Compute resources support two types of filter expressions: expressions that support regular expressions and expressions that follow API improvement proposal AIP-160. If you want to use AIP-160, your expression must specify the field name, an operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The operator must be either `=`, `!=`, `\u003e`, `\u003c`, `\u003c=`, `\u003e=` or `:`. For example, if you are filtering Compute Engine instances, you can exclude instances named `example-instance` by specifying `name != example-instance`. The `:` operator can be used with string fields to match substrings. For non-string fields it is equivalent to the `=` operator. The `:*` comparison can be used to test whether a key has been defined. For example, to find all objects with `owner` label use: ``` labels.owner:* ``` You can also filter nested fields. For example, you could specify `scheduling.automaticRestart = false` to include instances only if they are not scheduled for automatic restarts. You can use filtering on nested fields to filter based on resource labels. To filter on multiple expressions, provide each separate expression within parentheses. For example: ``` (scheduling.automaticRestart = true) (cpuPlatform = \"Intel Skylake\") ``` By default, each expression is an `AND` expression. However, you can include `AND` and `OR` expressions explicitly. For example: ``` (cpuPlatform = \"Intel Skylake\") OR (cpuPlatform = \"Intel Broadwell\") AND (scheduling.automaticRestart = true) ``` If you want to use a regular expression, use the `eq` (equal) or `ne` (not equal) operator against a single un-parenthesized expression with or without quotes or against multiple parenthesized expressions. Examples: `fieldname eq unquoted literal` `fieldname eq 'single quoted literal'` `fieldname eq \"double quoted literal\"` `(fieldname1 eq literal) (fieldname2 ne \"literal\")` The literal value is interpreted as a regular expression using Google RE2 library syntax. The literal value must match the entire field. For example, to filter for instances that do not end with name \"instance\", you would use `name ne .*instance`.", + // "description": "A filter expression that filters resources listed in the response. Most Compute resources support two types of filter expressions: expressions that support regular expressions and expressions that follow API improvement proposal AIP-160. These two types of filter expressions cannot be mixed in one request. If you want to use AIP-160, your expression must specify the field name, an operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The operator must be either `=`, `!=`, `\u003e`, `\u003c`, `\u003c=`, `\u003e=` or `:`. For example, if you are filtering Compute Engine instances, you can exclude instances named `example-instance` by specifying `name != example-instance`. The `:*` comparison can be used to test whether a key has been defined. For example, to find all objects with `owner` label use: ``` labels.owner:* ``` You can also filter nested fields. For example, you could specify `scheduling.automaticRestart = false` to include instances only if they are not scheduled for automatic restarts. You can use filtering on nested fields to filter based on resource labels. To filter on multiple expressions, provide each separate expression within parentheses. For example: ``` (scheduling.automaticRestart = true) (cpuPlatform = \"Intel Skylake\") ``` By default, each expression is an `AND` expression. However, you can include `AND` and `OR` expressions explicitly. For example: ``` (cpuPlatform = \"Intel Skylake\") OR (cpuPlatform = \"Intel Broadwell\") AND (scheduling.automaticRestart = true) ``` If you want to use a regular expression, use the `eq` (equal) or `ne` (not equal) operator against a single un-parenthesized expression with or without quotes or against multiple parenthesized expressions. Examples: `fieldname eq unquoted literal` `fieldname eq 'single quoted literal'` `fieldname eq \"double quoted literal\"` `(fieldname1 eq literal) (fieldname2 ne \"literal\")` The literal value is interpreted as a regular expression using Google RE2 library syntax. The literal value must match the entire field. For example, to filter for instances that do not end with name \"instance\", you would use `name ne .*instance`. You cannot combine constraints on multiple fields using regular expressions.", // "location": "query", // "type": "string" // }, @@ -8783,22 +8783,21 @@ func (r *TypeProvidersService) ListTypes(project string, typeProvider string) *T // filters resources listed in the response. Most Compute resources // support two types of filter expressions: expressions that support // regular expressions and expressions that follow API improvement -// proposal AIP-160. If you want to use AIP-160, your expression must -// specify the field name, an operator, and the value that you want to -// use for filtering. The value must be a string, a number, or a +// proposal AIP-160. These two types of filter expressions cannot be +// mixed in one request. If you want to use AIP-160, your expression +// must specify the field name, an operator, and the value that you want +// to use for filtering. The value must be a string, a number, or a // boolean. The operator must be either `=`, `!=`, `>`, `<`, `<=`, `>=` // or `:`. For example, if you are filtering Compute Engine instances, // you can exclude instances named `example-instance` by specifying -// `name != example-instance`. The `:` operator can be used with string -// fields to match substrings. For non-string fields it is equivalent to -// the `=` operator. The `:*` comparison can be used to test whether a -// key has been defined. For example, to find all objects with `owner` -// label use: ``` labels.owner:* ``` You can also filter nested fields. -// For example, you could specify `scheduling.automaticRestart = false` -// to include instances only if they are not scheduled for automatic -// restarts. You can use filtering on nested fields to filter based on -// resource labels. To filter on multiple expressions, provide each -// separate expression within parentheses. For example: ``` +// `name != example-instance`. The `:*` comparison can be used to test +// whether a key has been defined. For example, to find all objects with +// `owner` label use: ``` labels.owner:* ``` You can also filter nested +// fields. For example, you could specify `scheduling.automaticRestart = +// false` to include instances only if they are not scheduled for +// automatic restarts. You can use filtering on nested fields to filter +// based on resource labels. To filter on multiple expressions, provide +// each separate expression within parentheses. For example: ``` // (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") // ``` By default, each expression is an `AND` expression. However, you // can include `AND` and `OR` expressions explicitly. For example: ``` @@ -8813,7 +8812,8 @@ func (r *TypeProvidersService) ListTypes(project string, typeProvider string) *T // regular expression using Google RE2 library syntax. The literal value // must match the entire field. For example, to filter for instances // that do not end with name "instance", you would use `name ne -// .*instance`. +// .*instance`. You cannot combine constraints on multiple fields using +// regular expressions. func (c *TypeProvidersListTypesCall) Filter(filter string) *TypeProvidersListTypesCall { c.urlParams_.Set("filter", filter) return c @@ -8962,7 +8962,7 @@ func (c *TypeProvidersListTypesCall) Do(opts ...googleapi.CallOption) (*TypeProv // ], // "parameters": { // "filter": { - // "description": "A filter expression that filters resources listed in the response. Most Compute resources support two types of filter expressions: expressions that support regular expressions and expressions that follow API improvement proposal AIP-160. If you want to use AIP-160, your expression must specify the field name, an operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The operator must be either `=`, `!=`, `\u003e`, `\u003c`, `\u003c=`, `\u003e=` or `:`. For example, if you are filtering Compute Engine instances, you can exclude instances named `example-instance` by specifying `name != example-instance`. The `:` operator can be used with string fields to match substrings. For non-string fields it is equivalent to the `=` operator. The `:*` comparison can be used to test whether a key has been defined. For example, to find all objects with `owner` label use: ``` labels.owner:* ``` You can also filter nested fields. For example, you could specify `scheduling.automaticRestart = false` to include instances only if they are not scheduled for automatic restarts. You can use filtering on nested fields to filter based on resource labels. To filter on multiple expressions, provide each separate expression within parentheses. For example: ``` (scheduling.automaticRestart = true) (cpuPlatform = \"Intel Skylake\") ``` By default, each expression is an `AND` expression. However, you can include `AND` and `OR` expressions explicitly. For example: ``` (cpuPlatform = \"Intel Skylake\") OR (cpuPlatform = \"Intel Broadwell\") AND (scheduling.automaticRestart = true) ``` If you want to use a regular expression, use the `eq` (equal) or `ne` (not equal) operator against a single un-parenthesized expression with or without quotes or against multiple parenthesized expressions. Examples: `fieldname eq unquoted literal` `fieldname eq 'single quoted literal'` `fieldname eq \"double quoted literal\"` `(fieldname1 eq literal) (fieldname2 ne \"literal\")` The literal value is interpreted as a regular expression using Google RE2 library syntax. The literal value must match the entire field. For example, to filter for instances that do not end with name \"instance\", you would use `name ne .*instance`.", + // "description": "A filter expression that filters resources listed in the response. Most Compute resources support two types of filter expressions: expressions that support regular expressions and expressions that follow API improvement proposal AIP-160. These two types of filter expressions cannot be mixed in one request. If you want to use AIP-160, your expression must specify the field name, an operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The operator must be either `=`, `!=`, `\u003e`, `\u003c`, `\u003c=`, `\u003e=` or `:`. For example, if you are filtering Compute Engine instances, you can exclude instances named `example-instance` by specifying `name != example-instance`. The `:*` comparison can be used to test whether a key has been defined. For example, to find all objects with `owner` label use: ``` labels.owner:* ``` You can also filter nested fields. For example, you could specify `scheduling.automaticRestart = false` to include instances only if they are not scheduled for automatic restarts. You can use filtering on nested fields to filter based on resource labels. To filter on multiple expressions, provide each separate expression within parentheses. For example: ``` (scheduling.automaticRestart = true) (cpuPlatform = \"Intel Skylake\") ``` By default, each expression is an `AND` expression. However, you can include `AND` and `OR` expressions explicitly. For example: ``` (cpuPlatform = \"Intel Skylake\") OR (cpuPlatform = \"Intel Broadwell\") AND (scheduling.automaticRestart = true) ``` If you want to use a regular expression, use the `eq` (equal) or `ne` (not equal) operator against a single un-parenthesized expression with or without quotes or against multiple parenthesized expressions. Examples: `fieldname eq unquoted literal` `fieldname eq 'single quoted literal'` `fieldname eq \"double quoted literal\"` `(fieldname1 eq literal) (fieldname2 ne \"literal\")` The literal value is interpreted as a regular expression using Google RE2 library syntax. The literal value must match the entire field. For example, to filter for instances that do not end with name \"instance\", you would use `name ne .*instance`. You cannot combine constraints on multiple fields using regular expressions.", // "location": "query", // "type": "string" // }, @@ -9529,22 +9529,21 @@ func (r *TypesService) List(project string) *TypesListCall { // filters resources listed in the response. Most Compute resources // support two types of filter expressions: expressions that support // regular expressions and expressions that follow API improvement -// proposal AIP-160. If you want to use AIP-160, your expression must -// specify the field name, an operator, and the value that you want to -// use for filtering. The value must be a string, a number, or a +// proposal AIP-160. These two types of filter expressions cannot be +// mixed in one request. If you want to use AIP-160, your expression +// must specify the field name, an operator, and the value that you want +// to use for filtering. The value must be a string, a number, or a // boolean. The operator must be either `=`, `!=`, `>`, `<`, `<=`, `>=` // or `:`. For example, if you are filtering Compute Engine instances, // you can exclude instances named `example-instance` by specifying -// `name != example-instance`. The `:` operator can be used with string -// fields to match substrings. For non-string fields it is equivalent to -// the `=` operator. The `:*` comparison can be used to test whether a -// key has been defined. For example, to find all objects with `owner` -// label use: ``` labels.owner:* ``` You can also filter nested fields. -// For example, you could specify `scheduling.automaticRestart = false` -// to include instances only if they are not scheduled for automatic -// restarts. You can use filtering on nested fields to filter based on -// resource labels. To filter on multiple expressions, provide each -// separate expression within parentheses. For example: ``` +// `name != example-instance`. The `:*` comparison can be used to test +// whether a key has been defined. For example, to find all objects with +// `owner` label use: ``` labels.owner:* ``` You can also filter nested +// fields. For example, you could specify `scheduling.automaticRestart = +// false` to include instances only if they are not scheduled for +// automatic restarts. You can use filtering on nested fields to filter +// based on resource labels. To filter on multiple expressions, provide +// each separate expression within parentheses. For example: ``` // (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") // ``` By default, each expression is an `AND` expression. However, you // can include `AND` and `OR` expressions explicitly. For example: ``` @@ -9559,7 +9558,8 @@ func (r *TypesService) List(project string) *TypesListCall { // regular expression using Google RE2 library syntax. The literal value // must match the entire field. For example, to filter for instances // that do not end with name "instance", you would use `name ne -// .*instance`. +// .*instance`. You cannot combine constraints on multiple fields using +// regular expressions. func (c *TypesListCall) Filter(filter string) *TypesListCall { c.urlParams_.Set("filter", filter) return c @@ -9706,7 +9706,7 @@ func (c *TypesListCall) Do(opts ...googleapi.CallOption) (*TypesListResponse, er // ], // "parameters": { // "filter": { - // "description": "A filter expression that filters resources listed in the response. Most Compute resources support two types of filter expressions: expressions that support regular expressions and expressions that follow API improvement proposal AIP-160. If you want to use AIP-160, your expression must specify the field name, an operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The operator must be either `=`, `!=`, `\u003e`, `\u003c`, `\u003c=`, `\u003e=` or `:`. For example, if you are filtering Compute Engine instances, you can exclude instances named `example-instance` by specifying `name != example-instance`. The `:` operator can be used with string fields to match substrings. For non-string fields it is equivalent to the `=` operator. The `:*` comparison can be used to test whether a key has been defined. For example, to find all objects with `owner` label use: ``` labels.owner:* ``` You can also filter nested fields. For example, you could specify `scheduling.automaticRestart = false` to include instances only if they are not scheduled for automatic restarts. You can use filtering on nested fields to filter based on resource labels. To filter on multiple expressions, provide each separate expression within parentheses. For example: ``` (scheduling.automaticRestart = true) (cpuPlatform = \"Intel Skylake\") ``` By default, each expression is an `AND` expression. However, you can include `AND` and `OR` expressions explicitly. For example: ``` (cpuPlatform = \"Intel Skylake\") OR (cpuPlatform = \"Intel Broadwell\") AND (scheduling.automaticRestart = true) ``` If you want to use a regular expression, use the `eq` (equal) or `ne` (not equal) operator against a single un-parenthesized expression with or without quotes or against multiple parenthesized expressions. Examples: `fieldname eq unquoted literal` `fieldname eq 'single quoted literal'` `fieldname eq \"double quoted literal\"` `(fieldname1 eq literal) (fieldname2 ne \"literal\")` The literal value is interpreted as a regular expression using Google RE2 library syntax. The literal value must match the entire field. For example, to filter for instances that do not end with name \"instance\", you would use `name ne .*instance`.", + // "description": "A filter expression that filters resources listed in the response. Most Compute resources support two types of filter expressions: expressions that support regular expressions and expressions that follow API improvement proposal AIP-160. These two types of filter expressions cannot be mixed in one request. If you want to use AIP-160, your expression must specify the field name, an operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The operator must be either `=`, `!=`, `\u003e`, `\u003c`, `\u003c=`, `\u003e=` or `:`. For example, if you are filtering Compute Engine instances, you can exclude instances named `example-instance` by specifying `name != example-instance`. The `:*` comparison can be used to test whether a key has been defined. For example, to find all objects with `owner` label use: ``` labels.owner:* ``` You can also filter nested fields. For example, you could specify `scheduling.automaticRestart = false` to include instances only if they are not scheduled for automatic restarts. You can use filtering on nested fields to filter based on resource labels. To filter on multiple expressions, provide each separate expression within parentheses. For example: ``` (scheduling.automaticRestart = true) (cpuPlatform = \"Intel Skylake\") ``` By default, each expression is an `AND` expression. However, you can include `AND` and `OR` expressions explicitly. For example: ``` (cpuPlatform = \"Intel Skylake\") OR (cpuPlatform = \"Intel Broadwell\") AND (scheduling.automaticRestart = true) ``` If you want to use a regular expression, use the `eq` (equal) or `ne` (not equal) operator against a single un-parenthesized expression with or without quotes or against multiple parenthesized expressions. Examples: `fieldname eq unquoted literal` `fieldname eq 'single quoted literal'` `fieldname eq \"double quoted literal\"` `(fieldname1 eq literal) (fieldname2 ne \"literal\")` The literal value is interpreted as a regular expression using Google RE2 library syntax. The literal value must match the entire field. For example, to filter for instances that do not end with name \"instance\", you would use `name ne .*instance`. You cannot combine constraints on multiple fields using regular expressions.", // "location": "query", // "type": "string" // }, diff --git a/deploymentmanager/v2beta/deploymentmanager-api.json b/deploymentmanager/v2beta/deploymentmanager-api.json index 294cab93a98..b21bfa78581 100644 --- a/deploymentmanager/v2beta/deploymentmanager-api.json +++ b/deploymentmanager/v2beta/deploymentmanager-api.json @@ -224,7 +224,7 @@ ], "parameters": { "filter": { - "description": "A filter expression that filters resources listed in the response. Most Compute resources support two types of filter expressions: expressions that support regular expressions and expressions that follow API improvement proposal AIP-160. If you want to use AIP-160, your expression must specify the field name, an operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The operator must be either `=`, `!=`, `\u003e`, `\u003c`, `\u003c=`, `\u003e=` or `:`. For example, if you are filtering Compute Engine instances, you can exclude instances named `example-instance` by specifying `name != example-instance`. The `:` operator can be used with string fields to match substrings. For non-string fields it is equivalent to the `=` operator. The `:*` comparison can be used to test whether a key has been defined. For example, to find all objects with `owner` label use: ``` labels.owner:* ``` You can also filter nested fields. For example, you could specify `scheduling.automaticRestart = false` to include instances only if they are not scheduled for automatic restarts. You can use filtering on nested fields to filter based on resource labels. To filter on multiple expressions, provide each separate expression within parentheses. For example: ``` (scheduling.automaticRestart = true) (cpuPlatform = \"Intel Skylake\") ``` By default, each expression is an `AND` expression. However, you can include `AND` and `OR` expressions explicitly. For example: ``` (cpuPlatform = \"Intel Skylake\") OR (cpuPlatform = \"Intel Broadwell\") AND (scheduling.automaticRestart = true) ``` If you want to use a regular expression, use the `eq` (equal) or `ne` (not equal) operator against a single un-parenthesized expression with or without quotes or against multiple parenthesized expressions. Examples: `fieldname eq unquoted literal` `fieldname eq 'single quoted literal'` `fieldname eq \"double quoted literal\"` `(fieldname1 eq literal) (fieldname2 ne \"literal\")` The literal value is interpreted as a regular expression using Google RE2 library syntax. The literal value must match the entire field. For example, to filter for instances that do not end with name \"instance\", you would use `name ne .*instance`.", + "description": "A filter expression that filters resources listed in the response. Most Compute resources support two types of filter expressions: expressions that support regular expressions and expressions that follow API improvement proposal AIP-160. These two types of filter expressions cannot be mixed in one request. If you want to use AIP-160, your expression must specify the field name, an operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The operator must be either `=`, `!=`, `\u003e`, `\u003c`, `\u003c=`, `\u003e=` or `:`. For example, if you are filtering Compute Engine instances, you can exclude instances named `example-instance` by specifying `name != example-instance`. The `:*` comparison can be used to test whether a key has been defined. For example, to find all objects with `owner` label use: ``` labels.owner:* ``` You can also filter nested fields. For example, you could specify `scheduling.automaticRestart = false` to include instances only if they are not scheduled for automatic restarts. You can use filtering on nested fields to filter based on resource labels. To filter on multiple expressions, provide each separate expression within parentheses. For example: ``` (scheduling.automaticRestart = true) (cpuPlatform = \"Intel Skylake\") ``` By default, each expression is an `AND` expression. However, you can include `AND` and `OR` expressions explicitly. For example: ``` (cpuPlatform = \"Intel Skylake\") OR (cpuPlatform = \"Intel Broadwell\") AND (scheduling.automaticRestart = true) ``` If you want to use a regular expression, use the `eq` (equal) or `ne` (not equal) operator against a single un-parenthesized expression with or without quotes or against multiple parenthesized expressions. Examples: `fieldname eq unquoted literal` `fieldname eq 'single quoted literal'` `fieldname eq \"double quoted literal\"` `(fieldname1 eq literal) (fieldname2 ne \"literal\")` The literal value is interpreted as a regular expression using Google RE2 library syntax. The literal value must match the entire field. For example, to filter for instances that do not end with name \"instance\", you would use `name ne .*instance`. You cannot combine constraints on multiple fields using regular expressions.", "location": "query", "type": "string" }, @@ -563,7 +563,7 @@ ], "parameters": { "filter": { - "description": "A filter expression that filters resources listed in the response. Most Compute resources support two types of filter expressions: expressions that support regular expressions and expressions that follow API improvement proposal AIP-160. If you want to use AIP-160, your expression must specify the field name, an operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The operator must be either `=`, `!=`, `\u003e`, `\u003c`, `\u003c=`, `\u003e=` or `:`. For example, if you are filtering Compute Engine instances, you can exclude instances named `example-instance` by specifying `name != example-instance`. The `:` operator can be used with string fields to match substrings. For non-string fields it is equivalent to the `=` operator. The `:*` comparison can be used to test whether a key has been defined. For example, to find all objects with `owner` label use: ``` labels.owner:* ``` You can also filter nested fields. For example, you could specify `scheduling.automaticRestart = false` to include instances only if they are not scheduled for automatic restarts. You can use filtering on nested fields to filter based on resource labels. To filter on multiple expressions, provide each separate expression within parentheses. For example: ``` (scheduling.automaticRestart = true) (cpuPlatform = \"Intel Skylake\") ``` By default, each expression is an `AND` expression. However, you can include `AND` and `OR` expressions explicitly. For example: ``` (cpuPlatform = \"Intel Skylake\") OR (cpuPlatform = \"Intel Broadwell\") AND (scheduling.automaticRestart = true) ``` If you want to use a regular expression, use the `eq` (equal) or `ne` (not equal) operator against a single un-parenthesized expression with or without quotes or against multiple parenthesized expressions. Examples: `fieldname eq unquoted literal` `fieldname eq 'single quoted literal'` `fieldname eq \"double quoted literal\"` `(fieldname1 eq literal) (fieldname2 ne \"literal\")` The literal value is interpreted as a regular expression using Google RE2 library syntax. The literal value must match the entire field. For example, to filter for instances that do not end with name \"instance\", you would use `name ne .*instance`.", + "description": "A filter expression that filters resources listed in the response. Most Compute resources support two types of filter expressions: expressions that support regular expressions and expressions that follow API improvement proposal AIP-160. These two types of filter expressions cannot be mixed in one request. If you want to use AIP-160, your expression must specify the field name, an operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The operator must be either `=`, `!=`, `\u003e`, `\u003c`, `\u003c=`, `\u003e=` or `:`. For example, if you are filtering Compute Engine instances, you can exclude instances named `example-instance` by specifying `name != example-instance`. The `:*` comparison can be used to test whether a key has been defined. For example, to find all objects with `owner` label use: ``` labels.owner:* ``` You can also filter nested fields. For example, you could specify `scheduling.automaticRestart = false` to include instances only if they are not scheduled for automatic restarts. You can use filtering on nested fields to filter based on resource labels. To filter on multiple expressions, provide each separate expression within parentheses. For example: ``` (scheduling.automaticRestart = true) (cpuPlatform = \"Intel Skylake\") ``` By default, each expression is an `AND` expression. However, you can include `AND` and `OR` expressions explicitly. For example: ``` (cpuPlatform = \"Intel Skylake\") OR (cpuPlatform = \"Intel Broadwell\") AND (scheduling.automaticRestart = true) ``` If you want to use a regular expression, use the `eq` (equal) or `ne` (not equal) operator against a single un-parenthesized expression with or without quotes or against multiple parenthesized expressions. Examples: `fieldname eq unquoted literal` `fieldname eq 'single quoted literal'` `fieldname eq \"double quoted literal\"` `(fieldname1 eq literal) (fieldname2 ne \"literal\")` The literal value is interpreted as a regular expression using Google RE2 library syntax. The literal value must match the entire field. For example, to filter for instances that do not end with name \"instance\", you would use `name ne .*instance`. You cannot combine constraints on multiple fields using regular expressions.", "location": "query", "type": "string" }, @@ -927,7 +927,7 @@ "type": "string" }, "filter": { - "description": "A filter expression that filters resources listed in the response. Most Compute resources support two types of filter expressions: expressions that support regular expressions and expressions that follow API improvement proposal AIP-160. If you want to use AIP-160, your expression must specify the field name, an operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The operator must be either `=`, `!=`, `\u003e`, `\u003c`, `\u003c=`, `\u003e=` or `:`. For example, if you are filtering Compute Engine instances, you can exclude instances named `example-instance` by specifying `name != example-instance`. The `:` operator can be used with string fields to match substrings. For non-string fields it is equivalent to the `=` operator. The `:*` comparison can be used to test whether a key has been defined. For example, to find all objects with `owner` label use: ``` labels.owner:* ``` You can also filter nested fields. For example, you could specify `scheduling.automaticRestart = false` to include instances only if they are not scheduled for automatic restarts. You can use filtering on nested fields to filter based on resource labels. To filter on multiple expressions, provide each separate expression within parentheses. For example: ``` (scheduling.automaticRestart = true) (cpuPlatform = \"Intel Skylake\") ``` By default, each expression is an `AND` expression. However, you can include `AND` and `OR` expressions explicitly. For example: ``` (cpuPlatform = \"Intel Skylake\") OR (cpuPlatform = \"Intel Broadwell\") AND (scheduling.automaticRestart = true) ``` If you want to use a regular expression, use the `eq` (equal) or `ne` (not equal) operator against a single un-parenthesized expression with or without quotes or against multiple parenthesized expressions. Examples: `fieldname eq unquoted literal` `fieldname eq 'single quoted literal'` `fieldname eq \"double quoted literal\"` `(fieldname1 eq literal) (fieldname2 ne \"literal\")` The literal value is interpreted as a regular expression using Google RE2 library syntax. The literal value must match the entire field. For example, to filter for instances that do not end with name \"instance\", you would use `name ne .*instance`.", + "description": "A filter expression that filters resources listed in the response. Most Compute resources support two types of filter expressions: expressions that support regular expressions and expressions that follow API improvement proposal AIP-160. These two types of filter expressions cannot be mixed in one request. If you want to use AIP-160, your expression must specify the field name, an operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The operator must be either `=`, `!=`, `\u003e`, `\u003c`, `\u003c=`, `\u003e=` or `:`. For example, if you are filtering Compute Engine instances, you can exclude instances named `example-instance` by specifying `name != example-instance`. The `:*` comparison can be used to test whether a key has been defined. For example, to find all objects with `owner` label use: ``` labels.owner:* ``` You can also filter nested fields. For example, you could specify `scheduling.automaticRestart = false` to include instances only if they are not scheduled for automatic restarts. You can use filtering on nested fields to filter based on resource labels. To filter on multiple expressions, provide each separate expression within parentheses. For example: ``` (scheduling.automaticRestart = true) (cpuPlatform = \"Intel Skylake\") ``` By default, each expression is an `AND` expression. However, you can include `AND` and `OR` expressions explicitly. For example: ``` (cpuPlatform = \"Intel Skylake\") OR (cpuPlatform = \"Intel Broadwell\") AND (scheduling.automaticRestart = true) ``` If you want to use a regular expression, use the `eq` (equal) or `ne` (not equal) operator against a single un-parenthesized expression with or without quotes or against multiple parenthesized expressions. Examples: `fieldname eq unquoted literal` `fieldname eq 'single quoted literal'` `fieldname eq \"double quoted literal\"` `(fieldname1 eq literal) (fieldname2 ne \"literal\")` The literal value is interpreted as a regular expression using Google RE2 library syntax. The literal value must match the entire field. For example, to filter for instances that do not end with name \"instance\", you would use `name ne .*instance`. You cannot combine constraints on multiple fields using regular expressions.", "location": "query", "type": "string" }, @@ -1017,7 +1017,7 @@ ], "parameters": { "filter": { - "description": "A filter expression that filters resources listed in the response. Most Compute resources support two types of filter expressions: expressions that support regular expressions and expressions that follow API improvement proposal AIP-160. If you want to use AIP-160, your expression must specify the field name, an operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The operator must be either `=`, `!=`, `\u003e`, `\u003c`, `\u003c=`, `\u003e=` or `:`. For example, if you are filtering Compute Engine instances, you can exclude instances named `example-instance` by specifying `name != example-instance`. The `:` operator can be used with string fields to match substrings. For non-string fields it is equivalent to the `=` operator. The `:*` comparison can be used to test whether a key has been defined. For example, to find all objects with `owner` label use: ``` labels.owner:* ``` You can also filter nested fields. For example, you could specify `scheduling.automaticRestart = false` to include instances only if they are not scheduled for automatic restarts. You can use filtering on nested fields to filter based on resource labels. To filter on multiple expressions, provide each separate expression within parentheses. For example: ``` (scheduling.automaticRestart = true) (cpuPlatform = \"Intel Skylake\") ``` By default, each expression is an `AND` expression. However, you can include `AND` and `OR` expressions explicitly. For example: ``` (cpuPlatform = \"Intel Skylake\") OR (cpuPlatform = \"Intel Broadwell\") AND (scheduling.automaticRestart = true) ``` If you want to use a regular expression, use the `eq` (equal) or `ne` (not equal) operator against a single un-parenthesized expression with or without quotes or against multiple parenthesized expressions. Examples: `fieldname eq unquoted literal` `fieldname eq 'single quoted literal'` `fieldname eq \"double quoted literal\"` `(fieldname1 eq literal) (fieldname2 ne \"literal\")` The literal value is interpreted as a regular expression using Google RE2 library syntax. The literal value must match the entire field. For example, to filter for instances that do not end with name \"instance\", you would use `name ne .*instance`.", + "description": "A filter expression that filters resources listed in the response. Most Compute resources support two types of filter expressions: expressions that support regular expressions and expressions that follow API improvement proposal AIP-160. These two types of filter expressions cannot be mixed in one request. If you want to use AIP-160, your expression must specify the field name, an operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The operator must be either `=`, `!=`, `\u003e`, `\u003c`, `\u003c=`, `\u003e=` or `:`. For example, if you are filtering Compute Engine instances, you can exclude instances named `example-instance` by specifying `name != example-instance`. The `:*` comparison can be used to test whether a key has been defined. For example, to find all objects with `owner` label use: ``` labels.owner:* ``` You can also filter nested fields. For example, you could specify `scheduling.automaticRestart = false` to include instances only if they are not scheduled for automatic restarts. You can use filtering on nested fields to filter based on resource labels. To filter on multiple expressions, provide each separate expression within parentheses. For example: ``` (scheduling.automaticRestart = true) (cpuPlatform = \"Intel Skylake\") ``` By default, each expression is an `AND` expression. However, you can include `AND` and `OR` expressions explicitly. For example: ``` (cpuPlatform = \"Intel Skylake\") OR (cpuPlatform = \"Intel Broadwell\") AND (scheduling.automaticRestart = true) ``` If you want to use a regular expression, use the `eq` (equal) or `ne` (not equal) operator against a single un-parenthesized expression with or without quotes or against multiple parenthesized expressions. Examples: `fieldname eq unquoted literal` `fieldname eq 'single quoted literal'` `fieldname eq \"double quoted literal\"` `(fieldname1 eq literal) (fieldname2 ne \"literal\")` The literal value is interpreted as a regular expression using Google RE2 library syntax. The literal value must match the entire field. For example, to filter for instances that do not end with name \"instance\", you would use `name ne .*instance`. You cannot combine constraints on multiple fields using regular expressions.", "location": "query", "type": "string" }, @@ -1123,7 +1123,7 @@ "type": "string" }, "filter": { - "description": "A filter expression that filters resources listed in the response. Most Compute resources support two types of filter expressions: expressions that support regular expressions and expressions that follow API improvement proposal AIP-160. If you want to use AIP-160, your expression must specify the field name, an operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The operator must be either `=`, `!=`, `\u003e`, `\u003c`, `\u003c=`, `\u003e=` or `:`. For example, if you are filtering Compute Engine instances, you can exclude instances named `example-instance` by specifying `name != example-instance`. The `:` operator can be used with string fields to match substrings. For non-string fields it is equivalent to the `=` operator. The `:*` comparison can be used to test whether a key has been defined. For example, to find all objects with `owner` label use: ``` labels.owner:* ``` You can also filter nested fields. For example, you could specify `scheduling.automaticRestart = false` to include instances only if they are not scheduled for automatic restarts. You can use filtering on nested fields to filter based on resource labels. To filter on multiple expressions, provide each separate expression within parentheses. For example: ``` (scheduling.automaticRestart = true) (cpuPlatform = \"Intel Skylake\") ``` By default, each expression is an `AND` expression. However, you can include `AND` and `OR` expressions explicitly. For example: ``` (cpuPlatform = \"Intel Skylake\") OR (cpuPlatform = \"Intel Broadwell\") AND (scheduling.automaticRestart = true) ``` If you want to use a regular expression, use the `eq` (equal) or `ne` (not equal) operator against a single un-parenthesized expression with or without quotes or against multiple parenthesized expressions. Examples: `fieldname eq unquoted literal` `fieldname eq 'single quoted literal'` `fieldname eq \"double quoted literal\"` `(fieldname1 eq literal) (fieldname2 ne \"literal\")` The literal value is interpreted as a regular expression using Google RE2 library syntax. The literal value must match the entire field. For example, to filter for instances that do not end with name \"instance\", you would use `name ne .*instance`.", + "description": "A filter expression that filters resources listed in the response. Most Compute resources support two types of filter expressions: expressions that support regular expressions and expressions that follow API improvement proposal AIP-160. These two types of filter expressions cannot be mixed in one request. If you want to use AIP-160, your expression must specify the field name, an operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The operator must be either `=`, `!=`, `\u003e`, `\u003c`, `\u003c=`, `\u003e=` or `:`. For example, if you are filtering Compute Engine instances, you can exclude instances named `example-instance` by specifying `name != example-instance`. The `:*` comparison can be used to test whether a key has been defined. For example, to find all objects with `owner` label use: ``` labels.owner:* ``` You can also filter nested fields. For example, you could specify `scheduling.automaticRestart = false` to include instances only if they are not scheduled for automatic restarts. You can use filtering on nested fields to filter based on resource labels. To filter on multiple expressions, provide each separate expression within parentheses. For example: ``` (scheduling.automaticRestart = true) (cpuPlatform = \"Intel Skylake\") ``` By default, each expression is an `AND` expression. However, you can include `AND` and `OR` expressions explicitly. For example: ``` (cpuPlatform = \"Intel Skylake\") OR (cpuPlatform = \"Intel Broadwell\") AND (scheduling.automaticRestart = true) ``` If you want to use a regular expression, use the `eq` (equal) or `ne` (not equal) operator against a single un-parenthesized expression with or without quotes or against multiple parenthesized expressions. Examples: `fieldname eq unquoted literal` `fieldname eq 'single quoted literal'` `fieldname eq \"double quoted literal\"` `(fieldname1 eq literal) (fieldname2 ne \"literal\")` The literal value is interpreted as a regular expression using Google RE2 library syntax. The literal value must match the entire field. For example, to filter for instances that do not end with name \"instance\", you would use `name ne .*instance`. You cannot combine constraints on multiple fields using regular expressions.", "location": "query", "type": "string" }, @@ -1320,7 +1320,7 @@ ], "parameters": { "filter": { - "description": "A filter expression that filters resources listed in the response. Most Compute resources support two types of filter expressions: expressions that support regular expressions and expressions that follow API improvement proposal AIP-160. If you want to use AIP-160, your expression must specify the field name, an operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The operator must be either `=`, `!=`, `\u003e`, `\u003c`, `\u003c=`, `\u003e=` or `:`. For example, if you are filtering Compute Engine instances, you can exclude instances named `example-instance` by specifying `name != example-instance`. The `:` operator can be used with string fields to match substrings. For non-string fields it is equivalent to the `=` operator. The `:*` comparison can be used to test whether a key has been defined. For example, to find all objects with `owner` label use: ``` labels.owner:* ``` You can also filter nested fields. For example, you could specify `scheduling.automaticRestart = false` to include instances only if they are not scheduled for automatic restarts. You can use filtering on nested fields to filter based on resource labels. To filter on multiple expressions, provide each separate expression within parentheses. For example: ``` (scheduling.automaticRestart = true) (cpuPlatform = \"Intel Skylake\") ``` By default, each expression is an `AND` expression. However, you can include `AND` and `OR` expressions explicitly. For example: ``` (cpuPlatform = \"Intel Skylake\") OR (cpuPlatform = \"Intel Broadwell\") AND (scheduling.automaticRestart = true) ``` If you want to use a regular expression, use the `eq` (equal) or `ne` (not equal) operator against a single un-parenthesized expression with or without quotes or against multiple parenthesized expressions. Examples: `fieldname eq unquoted literal` `fieldname eq 'single quoted literal'` `fieldname eq \"double quoted literal\"` `(fieldname1 eq literal) (fieldname2 ne \"literal\")` The literal value is interpreted as a regular expression using Google RE2 library syntax. The literal value must match the entire field. For example, to filter for instances that do not end with name \"instance\", you would use `name ne .*instance`.", + "description": "A filter expression that filters resources listed in the response. Most Compute resources support two types of filter expressions: expressions that support regular expressions and expressions that follow API improvement proposal AIP-160. These two types of filter expressions cannot be mixed in one request. If you want to use AIP-160, your expression must specify the field name, an operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The operator must be either `=`, `!=`, `\u003e`, `\u003c`, `\u003c=`, `\u003e=` or `:`. For example, if you are filtering Compute Engine instances, you can exclude instances named `example-instance` by specifying `name != example-instance`. The `:*` comparison can be used to test whether a key has been defined. For example, to find all objects with `owner` label use: ``` labels.owner:* ``` You can also filter nested fields. For example, you could specify `scheduling.automaticRestart = false` to include instances only if they are not scheduled for automatic restarts. You can use filtering on nested fields to filter based on resource labels. To filter on multiple expressions, provide each separate expression within parentheses. For example: ``` (scheduling.automaticRestart = true) (cpuPlatform = \"Intel Skylake\") ``` By default, each expression is an `AND` expression. However, you can include `AND` and `OR` expressions explicitly. For example: ``` (cpuPlatform = \"Intel Skylake\") OR (cpuPlatform = \"Intel Broadwell\") AND (scheduling.automaticRestart = true) ``` If you want to use a regular expression, use the `eq` (equal) or `ne` (not equal) operator against a single un-parenthesized expression with or without quotes or against multiple parenthesized expressions. Examples: `fieldname eq unquoted literal` `fieldname eq 'single quoted literal'` `fieldname eq \"double quoted literal\"` `(fieldname1 eq literal) (fieldname2 ne \"literal\")` The literal value is interpreted as a regular expression using Google RE2 library syntax. The literal value must match the entire field. For example, to filter for instances that do not end with name \"instance\", you would use `name ne .*instance`. You cannot combine constraints on multiple fields using regular expressions.", "location": "query", "type": "string" }, @@ -1372,7 +1372,7 @@ ], "parameters": { "filter": { - "description": "A filter expression that filters resources listed in the response. Most Compute resources support two types of filter expressions: expressions that support regular expressions and expressions that follow API improvement proposal AIP-160. If you want to use AIP-160, your expression must specify the field name, an operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The operator must be either `=`, `!=`, `\u003e`, `\u003c`, `\u003c=`, `\u003e=` or `:`. For example, if you are filtering Compute Engine instances, you can exclude instances named `example-instance` by specifying `name != example-instance`. The `:` operator can be used with string fields to match substrings. For non-string fields it is equivalent to the `=` operator. The `:*` comparison can be used to test whether a key has been defined. For example, to find all objects with `owner` label use: ``` labels.owner:* ``` You can also filter nested fields. For example, you could specify `scheduling.automaticRestart = false` to include instances only if they are not scheduled for automatic restarts. You can use filtering on nested fields to filter based on resource labels. To filter on multiple expressions, provide each separate expression within parentheses. For example: ``` (scheduling.automaticRestart = true) (cpuPlatform = \"Intel Skylake\") ``` By default, each expression is an `AND` expression. However, you can include `AND` and `OR` expressions explicitly. For example: ``` (cpuPlatform = \"Intel Skylake\") OR (cpuPlatform = \"Intel Broadwell\") AND (scheduling.automaticRestart = true) ``` If you want to use a regular expression, use the `eq` (equal) or `ne` (not equal) operator against a single un-parenthesized expression with or without quotes or against multiple parenthesized expressions. Examples: `fieldname eq unquoted literal` `fieldname eq 'single quoted literal'` `fieldname eq \"double quoted literal\"` `(fieldname1 eq literal) (fieldname2 ne \"literal\")` The literal value is interpreted as a regular expression using Google RE2 library syntax. The literal value must match the entire field. For example, to filter for instances that do not end with name \"instance\", you would use `name ne .*instance`.", + "description": "A filter expression that filters resources listed in the response. Most Compute resources support two types of filter expressions: expressions that support regular expressions and expressions that follow API improvement proposal AIP-160. These two types of filter expressions cannot be mixed in one request. If you want to use AIP-160, your expression must specify the field name, an operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The operator must be either `=`, `!=`, `\u003e`, `\u003c`, `\u003c=`, `\u003e=` or `:`. For example, if you are filtering Compute Engine instances, you can exclude instances named `example-instance` by specifying `name != example-instance`. The `:*` comparison can be used to test whether a key has been defined. For example, to find all objects with `owner` label use: ``` labels.owner:* ``` You can also filter nested fields. For example, you could specify `scheduling.automaticRestart = false` to include instances only if they are not scheduled for automatic restarts. You can use filtering on nested fields to filter based on resource labels. To filter on multiple expressions, provide each separate expression within parentheses. For example: ``` (scheduling.automaticRestart = true) (cpuPlatform = \"Intel Skylake\") ``` By default, each expression is an `AND` expression. However, you can include `AND` and `OR` expressions explicitly. For example: ``` (cpuPlatform = \"Intel Skylake\") OR (cpuPlatform = \"Intel Broadwell\") AND (scheduling.automaticRestart = true) ``` If you want to use a regular expression, use the `eq` (equal) or `ne` (not equal) operator against a single un-parenthesized expression with or without quotes or against multiple parenthesized expressions. Examples: `fieldname eq unquoted literal` `fieldname eq 'single quoted literal'` `fieldname eq \"double quoted literal\"` `(fieldname1 eq literal) (fieldname2 ne \"literal\")` The literal value is interpreted as a regular expression using Google RE2 library syntax. The literal value must match the entire field. For example, to filter for instances that do not end with name \"instance\", you would use `name ne .*instance`. You cannot combine constraints on multiple fields using regular expressions.", "location": "query", "type": "string" }, @@ -1508,7 +1508,7 @@ ], "parameters": { "filter": { - "description": "A filter expression that filters resources listed in the response. Most Compute resources support two types of filter expressions: expressions that support regular expressions and expressions that follow API improvement proposal AIP-160. If you want to use AIP-160, your expression must specify the field name, an operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The operator must be either `=`, `!=`, `\u003e`, `\u003c`, `\u003c=`, `\u003e=` or `:`. For example, if you are filtering Compute Engine instances, you can exclude instances named `example-instance` by specifying `name != example-instance`. The `:` operator can be used with string fields to match substrings. For non-string fields it is equivalent to the `=` operator. The `:*` comparison can be used to test whether a key has been defined. For example, to find all objects with `owner` label use: ``` labels.owner:* ``` You can also filter nested fields. For example, you could specify `scheduling.automaticRestart = false` to include instances only if they are not scheduled for automatic restarts. You can use filtering on nested fields to filter based on resource labels. To filter on multiple expressions, provide each separate expression within parentheses. For example: ``` (scheduling.automaticRestart = true) (cpuPlatform = \"Intel Skylake\") ``` By default, each expression is an `AND` expression. However, you can include `AND` and `OR` expressions explicitly. For example: ``` (cpuPlatform = \"Intel Skylake\") OR (cpuPlatform = \"Intel Broadwell\") AND (scheduling.automaticRestart = true) ``` If you want to use a regular expression, use the `eq` (equal) or `ne` (not equal) operator against a single un-parenthesized expression with or without quotes or against multiple parenthesized expressions. Examples: `fieldname eq unquoted literal` `fieldname eq 'single quoted literal'` `fieldname eq \"double quoted literal\"` `(fieldname1 eq literal) (fieldname2 ne \"literal\")` The literal value is interpreted as a regular expression using Google RE2 library syntax. The literal value must match the entire field. For example, to filter for instances that do not end with name \"instance\", you would use `name ne .*instance`.", + "description": "A filter expression that filters resources listed in the response. Most Compute resources support two types of filter expressions: expressions that support regular expressions and expressions that follow API improvement proposal AIP-160. These two types of filter expressions cannot be mixed in one request. If you want to use AIP-160, your expression must specify the field name, an operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The operator must be either `=`, `!=`, `\u003e`, `\u003c`, `\u003c=`, `\u003e=` or `:`. For example, if you are filtering Compute Engine instances, you can exclude instances named `example-instance` by specifying `name != example-instance`. The `:*` comparison can be used to test whether a key has been defined. For example, to find all objects with `owner` label use: ``` labels.owner:* ``` You can also filter nested fields. For example, you could specify `scheduling.automaticRestart = false` to include instances only if they are not scheduled for automatic restarts. You can use filtering on nested fields to filter based on resource labels. To filter on multiple expressions, provide each separate expression within parentheses. For example: ``` (scheduling.automaticRestart = true) (cpuPlatform = \"Intel Skylake\") ``` By default, each expression is an `AND` expression. However, you can include `AND` and `OR` expressions explicitly. For example: ``` (cpuPlatform = \"Intel Skylake\") OR (cpuPlatform = \"Intel Broadwell\") AND (scheduling.automaticRestart = true) ``` If you want to use a regular expression, use the `eq` (equal) or `ne` (not equal) operator against a single un-parenthesized expression with or without quotes or against multiple parenthesized expressions. Examples: `fieldname eq unquoted literal` `fieldname eq 'single quoted literal'` `fieldname eq \"double quoted literal\"` `(fieldname1 eq literal) (fieldname2 ne \"literal\")` The literal value is interpreted as a regular expression using Google RE2 library syntax. The literal value must match the entire field. For example, to filter for instances that do not end with name \"instance\", you would use `name ne .*instance`. You cannot combine constraints on multiple fields using regular expressions.", "location": "query", "type": "string" }, @@ -1552,7 +1552,7 @@ } } }, - "revision": "20230829", + "revision": "20230921", "rootUrl": "https://deploymentmanager.googleapis.com/", "schemas": { "AsyncOptions": { diff --git a/deploymentmanager/v2beta/deploymentmanager-gen.go b/deploymentmanager/v2beta/deploymentmanager-gen.go index d5a73b61fc1..9922f599553 100644 --- a/deploymentmanager/v2beta/deploymentmanager-gen.go +++ b/deploymentmanager/v2beta/deploymentmanager-gen.go @@ -3810,22 +3810,21 @@ func (r *CompositeTypesService) List(project string) *CompositeTypesListCall { // filters resources listed in the response. Most Compute resources // support two types of filter expressions: expressions that support // regular expressions and expressions that follow API improvement -// proposal AIP-160. If you want to use AIP-160, your expression must -// specify the field name, an operator, and the value that you want to -// use for filtering. The value must be a string, a number, or a +// proposal AIP-160. These two types of filter expressions cannot be +// mixed in one request. If you want to use AIP-160, your expression +// must specify the field name, an operator, and the value that you want +// to use for filtering. The value must be a string, a number, or a // boolean. The operator must be either `=`, `!=`, `>`, `<`, `<=`, `>=` // or `:`. For example, if you are filtering Compute Engine instances, // you can exclude instances named `example-instance` by specifying -// `name != example-instance`. The `:` operator can be used with string -// fields to match substrings. For non-string fields it is equivalent to -// the `=` operator. The `:*` comparison can be used to test whether a -// key has been defined. For example, to find all objects with `owner` -// label use: ``` labels.owner:* ``` You can also filter nested fields. -// For example, you could specify `scheduling.automaticRestart = false` -// to include instances only if they are not scheduled for automatic -// restarts. You can use filtering on nested fields to filter based on -// resource labels. To filter on multiple expressions, provide each -// separate expression within parentheses. For example: ``` +// `name != example-instance`. The `:*` comparison can be used to test +// whether a key has been defined. For example, to find all objects with +// `owner` label use: ``` labels.owner:* ``` You can also filter nested +// fields. For example, you could specify `scheduling.automaticRestart = +// false` to include instances only if they are not scheduled for +// automatic restarts. You can use filtering on nested fields to filter +// based on resource labels. To filter on multiple expressions, provide +// each separate expression within parentheses. For example: ``` // (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") // ``` By default, each expression is an `AND` expression. However, you // can include `AND` and `OR` expressions explicitly. For example: ``` @@ -3840,7 +3839,8 @@ func (r *CompositeTypesService) List(project string) *CompositeTypesListCall { // regular expression using Google RE2 library syntax. The literal value // must match the entire field. For example, to filter for instances // that do not end with name "instance", you would use `name ne -// .*instance`. +// .*instance`. You cannot combine constraints on multiple fields using +// regular expressions. func (c *CompositeTypesListCall) Filter(filter string) *CompositeTypesListCall { c.urlParams_.Set("filter", filter) return c @@ -3987,7 +3987,7 @@ func (c *CompositeTypesListCall) Do(opts ...googleapi.CallOption) (*CompositeTyp // ], // "parameters": { // "filter": { - // "description": "A filter expression that filters resources listed in the response. Most Compute resources support two types of filter expressions: expressions that support regular expressions and expressions that follow API improvement proposal AIP-160. If you want to use AIP-160, your expression must specify the field name, an operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The operator must be either `=`, `!=`, `\u003e`, `\u003c`, `\u003c=`, `\u003e=` or `:`. For example, if you are filtering Compute Engine instances, you can exclude instances named `example-instance` by specifying `name != example-instance`. The `:` operator can be used with string fields to match substrings. For non-string fields it is equivalent to the `=` operator. The `:*` comparison can be used to test whether a key has been defined. For example, to find all objects with `owner` label use: ``` labels.owner:* ``` You can also filter nested fields. For example, you could specify `scheduling.automaticRestart = false` to include instances only if they are not scheduled for automatic restarts. You can use filtering on nested fields to filter based on resource labels. To filter on multiple expressions, provide each separate expression within parentheses. For example: ``` (scheduling.automaticRestart = true) (cpuPlatform = \"Intel Skylake\") ``` By default, each expression is an `AND` expression. However, you can include `AND` and `OR` expressions explicitly. For example: ``` (cpuPlatform = \"Intel Skylake\") OR (cpuPlatform = \"Intel Broadwell\") AND (scheduling.automaticRestart = true) ``` If you want to use a regular expression, use the `eq` (equal) or `ne` (not equal) operator against a single un-parenthesized expression with or without quotes or against multiple parenthesized expressions. Examples: `fieldname eq unquoted literal` `fieldname eq 'single quoted literal'` `fieldname eq \"double quoted literal\"` `(fieldname1 eq literal) (fieldname2 ne \"literal\")` The literal value is interpreted as a regular expression using Google RE2 library syntax. The literal value must match the entire field. For example, to filter for instances that do not end with name \"instance\", you would use `name ne .*instance`.", + // "description": "A filter expression that filters resources listed in the response. Most Compute resources support two types of filter expressions: expressions that support regular expressions and expressions that follow API improvement proposal AIP-160. These two types of filter expressions cannot be mixed in one request. If you want to use AIP-160, your expression must specify the field name, an operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The operator must be either `=`, `!=`, `\u003e`, `\u003c`, `\u003c=`, `\u003e=` or `:`. For example, if you are filtering Compute Engine instances, you can exclude instances named `example-instance` by specifying `name != example-instance`. The `:*` comparison can be used to test whether a key has been defined. For example, to find all objects with `owner` label use: ``` labels.owner:* ``` You can also filter nested fields. For example, you could specify `scheduling.automaticRestart = false` to include instances only if they are not scheduled for automatic restarts. You can use filtering on nested fields to filter based on resource labels. To filter on multiple expressions, provide each separate expression within parentheses. For example: ``` (scheduling.automaticRestart = true) (cpuPlatform = \"Intel Skylake\") ``` By default, each expression is an `AND` expression. However, you can include `AND` and `OR` expressions explicitly. For example: ``` (cpuPlatform = \"Intel Skylake\") OR (cpuPlatform = \"Intel Broadwell\") AND (scheduling.automaticRestart = true) ``` If you want to use a regular expression, use the `eq` (equal) or `ne` (not equal) operator against a single un-parenthesized expression with or without quotes or against multiple parenthesized expressions. Examples: `fieldname eq unquoted literal` `fieldname eq 'single quoted literal'` `fieldname eq \"double quoted literal\"` `(fieldname1 eq literal) (fieldname2 ne \"literal\")` The literal value is interpreted as a regular expression using Google RE2 library syntax. The literal value must match the entire field. For example, to filter for instances that do not end with name \"instance\", you would use `name ne .*instance`. You cannot combine constraints on multiple fields using regular expressions.", // "location": "query", // "type": "string" // }, @@ -5239,22 +5239,21 @@ func (r *DeploymentsService) List(project string) *DeploymentsListCall { // filters resources listed in the response. Most Compute resources // support two types of filter expressions: expressions that support // regular expressions and expressions that follow API improvement -// proposal AIP-160. If you want to use AIP-160, your expression must -// specify the field name, an operator, and the value that you want to -// use for filtering. The value must be a string, a number, or a +// proposal AIP-160. These two types of filter expressions cannot be +// mixed in one request. If you want to use AIP-160, your expression +// must specify the field name, an operator, and the value that you want +// to use for filtering. The value must be a string, a number, or a // boolean. The operator must be either `=`, `!=`, `>`, `<`, `<=`, `>=` // or `:`. For example, if you are filtering Compute Engine instances, // you can exclude instances named `example-instance` by specifying -// `name != example-instance`. The `:` operator can be used with string -// fields to match substrings. For non-string fields it is equivalent to -// the `=` operator. The `:*` comparison can be used to test whether a -// key has been defined. For example, to find all objects with `owner` -// label use: ``` labels.owner:* ``` You can also filter nested fields. -// For example, you could specify `scheduling.automaticRestart = false` -// to include instances only if they are not scheduled for automatic -// restarts. You can use filtering on nested fields to filter based on -// resource labels. To filter on multiple expressions, provide each -// separate expression within parentheses. For example: ``` +// `name != example-instance`. The `:*` comparison can be used to test +// whether a key has been defined. For example, to find all objects with +// `owner` label use: ``` labels.owner:* ``` You can also filter nested +// fields. For example, you could specify `scheduling.automaticRestart = +// false` to include instances only if they are not scheduled for +// automatic restarts. You can use filtering on nested fields to filter +// based on resource labels. To filter on multiple expressions, provide +// each separate expression within parentheses. For example: ``` // (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") // ``` By default, each expression is an `AND` expression. However, you // can include `AND` and `OR` expressions explicitly. For example: ``` @@ -5269,7 +5268,8 @@ func (r *DeploymentsService) List(project string) *DeploymentsListCall { // regular expression using Google RE2 library syntax. The literal value // must match the entire field. For example, to filter for instances // that do not end with name "instance", you would use `name ne -// .*instance`. +// .*instance`. You cannot combine constraints on multiple fields using +// regular expressions. func (c *DeploymentsListCall) Filter(filter string) *DeploymentsListCall { c.urlParams_.Set("filter", filter) return c @@ -5416,7 +5416,7 @@ func (c *DeploymentsListCall) Do(opts ...googleapi.CallOption) (*DeploymentsList // ], // "parameters": { // "filter": { - // "description": "A filter expression that filters resources listed in the response. Most Compute resources support two types of filter expressions: expressions that support regular expressions and expressions that follow API improvement proposal AIP-160. If you want to use AIP-160, your expression must specify the field name, an operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The operator must be either `=`, `!=`, `\u003e`, `\u003c`, `\u003c=`, `\u003e=` or `:`. For example, if you are filtering Compute Engine instances, you can exclude instances named `example-instance` by specifying `name != example-instance`. The `:` operator can be used with string fields to match substrings. For non-string fields it is equivalent to the `=` operator. The `:*` comparison can be used to test whether a key has been defined. For example, to find all objects with `owner` label use: ``` labels.owner:* ``` You can also filter nested fields. For example, you could specify `scheduling.automaticRestart = false` to include instances only if they are not scheduled for automatic restarts. You can use filtering on nested fields to filter based on resource labels. To filter on multiple expressions, provide each separate expression within parentheses. For example: ``` (scheduling.automaticRestart = true) (cpuPlatform = \"Intel Skylake\") ``` By default, each expression is an `AND` expression. However, you can include `AND` and `OR` expressions explicitly. For example: ``` (cpuPlatform = \"Intel Skylake\") OR (cpuPlatform = \"Intel Broadwell\") AND (scheduling.automaticRestart = true) ``` If you want to use a regular expression, use the `eq` (equal) or `ne` (not equal) operator against a single un-parenthesized expression with or without quotes or against multiple parenthesized expressions. Examples: `fieldname eq unquoted literal` `fieldname eq 'single quoted literal'` `fieldname eq \"double quoted literal\"` `(fieldname1 eq literal) (fieldname2 ne \"literal\")` The literal value is interpreted as a regular expression using Google RE2 library syntax. The literal value must match the entire field. For example, to filter for instances that do not end with name \"instance\", you would use `name ne .*instance`.", + // "description": "A filter expression that filters resources listed in the response. Most Compute resources support two types of filter expressions: expressions that support regular expressions and expressions that follow API improvement proposal AIP-160. These two types of filter expressions cannot be mixed in one request. If you want to use AIP-160, your expression must specify the field name, an operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The operator must be either `=`, `!=`, `\u003e`, `\u003c`, `\u003c=`, `\u003e=` or `:`. For example, if you are filtering Compute Engine instances, you can exclude instances named `example-instance` by specifying `name != example-instance`. The `:*` comparison can be used to test whether a key has been defined. For example, to find all objects with `owner` label use: ``` labels.owner:* ``` You can also filter nested fields. For example, you could specify `scheduling.automaticRestart = false` to include instances only if they are not scheduled for automatic restarts. You can use filtering on nested fields to filter based on resource labels. To filter on multiple expressions, provide each separate expression within parentheses. For example: ``` (scheduling.automaticRestart = true) (cpuPlatform = \"Intel Skylake\") ``` By default, each expression is an `AND` expression. However, you can include `AND` and `OR` expressions explicitly. For example: ``` (cpuPlatform = \"Intel Skylake\") OR (cpuPlatform = \"Intel Broadwell\") AND (scheduling.automaticRestart = true) ``` If you want to use a regular expression, use the `eq` (equal) or `ne` (not equal) operator against a single un-parenthesized expression with or without quotes or against multiple parenthesized expressions. Examples: `fieldname eq unquoted literal` `fieldname eq 'single quoted literal'` `fieldname eq \"double quoted literal\"` `(fieldname1 eq literal) (fieldname2 ne \"literal\")` The literal value is interpreted as a regular expression using Google RE2 library syntax. The literal value must match the entire field. For example, to filter for instances that do not end with name \"instance\", you would use `name ne .*instance`. You cannot combine constraints on multiple fields using regular expressions.", // "location": "query", // "type": "string" // }, @@ -6616,22 +6616,21 @@ func (r *ManifestsService) List(project string, deployment string) *ManifestsLis // filters resources listed in the response. Most Compute resources // support two types of filter expressions: expressions that support // regular expressions and expressions that follow API improvement -// proposal AIP-160. If you want to use AIP-160, your expression must -// specify the field name, an operator, and the value that you want to -// use for filtering. The value must be a string, a number, or a +// proposal AIP-160. These two types of filter expressions cannot be +// mixed in one request. If you want to use AIP-160, your expression +// must specify the field name, an operator, and the value that you want +// to use for filtering. The value must be a string, a number, or a // boolean. The operator must be either `=`, `!=`, `>`, `<`, `<=`, `>=` // or `:`. For example, if you are filtering Compute Engine instances, // you can exclude instances named `example-instance` by specifying -// `name != example-instance`. The `:` operator can be used with string -// fields to match substrings. For non-string fields it is equivalent to -// the `=` operator. The `:*` comparison can be used to test whether a -// key has been defined. For example, to find all objects with `owner` -// label use: ``` labels.owner:* ``` You can also filter nested fields. -// For example, you could specify `scheduling.automaticRestart = false` -// to include instances only if they are not scheduled for automatic -// restarts. You can use filtering on nested fields to filter based on -// resource labels. To filter on multiple expressions, provide each -// separate expression within parentheses. For example: ``` +// `name != example-instance`. The `:*` comparison can be used to test +// whether a key has been defined. For example, to find all objects with +// `owner` label use: ``` labels.owner:* ``` You can also filter nested +// fields. For example, you could specify `scheduling.automaticRestart = +// false` to include instances only if they are not scheduled for +// automatic restarts. You can use filtering on nested fields to filter +// based on resource labels. To filter on multiple expressions, provide +// each separate expression within parentheses. For example: ``` // (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") // ``` By default, each expression is an `AND` expression. However, you // can include `AND` and `OR` expressions explicitly. For example: ``` @@ -6646,7 +6645,8 @@ func (r *ManifestsService) List(project string, deployment string) *ManifestsLis // regular expression using Google RE2 library syntax. The literal value // must match the entire field. For example, to filter for instances // that do not end with name "instance", you would use `name ne -// .*instance`. +// .*instance`. You cannot combine constraints on multiple fields using +// regular expressions. func (c *ManifestsListCall) Filter(filter string) *ManifestsListCall { c.urlParams_.Set("filter", filter) return c @@ -6802,7 +6802,7 @@ func (c *ManifestsListCall) Do(opts ...googleapi.CallOption) (*ManifestsListResp // "type": "string" // }, // "filter": { - // "description": "A filter expression that filters resources listed in the response. Most Compute resources support two types of filter expressions: expressions that support regular expressions and expressions that follow API improvement proposal AIP-160. If you want to use AIP-160, your expression must specify the field name, an operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The operator must be either `=`, `!=`, `\u003e`, `\u003c`, `\u003c=`, `\u003e=` or `:`. For example, if you are filtering Compute Engine instances, you can exclude instances named `example-instance` by specifying `name != example-instance`. The `:` operator can be used with string fields to match substrings. For non-string fields it is equivalent to the `=` operator. The `:*` comparison can be used to test whether a key has been defined. For example, to find all objects with `owner` label use: ``` labels.owner:* ``` You can also filter nested fields. For example, you could specify `scheduling.automaticRestart = false` to include instances only if they are not scheduled for automatic restarts. You can use filtering on nested fields to filter based on resource labels. To filter on multiple expressions, provide each separate expression within parentheses. For example: ``` (scheduling.automaticRestart = true) (cpuPlatform = \"Intel Skylake\") ``` By default, each expression is an `AND` expression. However, you can include `AND` and `OR` expressions explicitly. For example: ``` (cpuPlatform = \"Intel Skylake\") OR (cpuPlatform = \"Intel Broadwell\") AND (scheduling.automaticRestart = true) ``` If you want to use a regular expression, use the `eq` (equal) or `ne` (not equal) operator against a single un-parenthesized expression with or without quotes or against multiple parenthesized expressions. Examples: `fieldname eq unquoted literal` `fieldname eq 'single quoted literal'` `fieldname eq \"double quoted literal\"` `(fieldname1 eq literal) (fieldname2 ne \"literal\")` The literal value is interpreted as a regular expression using Google RE2 library syntax. The literal value must match the entire field. For example, to filter for instances that do not end with name \"instance\", you would use `name ne .*instance`.", + // "description": "A filter expression that filters resources listed in the response. Most Compute resources support two types of filter expressions: expressions that support regular expressions and expressions that follow API improvement proposal AIP-160. These two types of filter expressions cannot be mixed in one request. If you want to use AIP-160, your expression must specify the field name, an operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The operator must be either `=`, `!=`, `\u003e`, `\u003c`, `\u003c=`, `\u003e=` or `:`. For example, if you are filtering Compute Engine instances, you can exclude instances named `example-instance` by specifying `name != example-instance`. The `:*` comparison can be used to test whether a key has been defined. For example, to find all objects with `owner` label use: ``` labels.owner:* ``` You can also filter nested fields. For example, you could specify `scheduling.automaticRestart = false` to include instances only if they are not scheduled for automatic restarts. You can use filtering on nested fields to filter based on resource labels. To filter on multiple expressions, provide each separate expression within parentheses. For example: ``` (scheduling.automaticRestart = true) (cpuPlatform = \"Intel Skylake\") ``` By default, each expression is an `AND` expression. However, you can include `AND` and `OR` expressions explicitly. For example: ``` (cpuPlatform = \"Intel Skylake\") OR (cpuPlatform = \"Intel Broadwell\") AND (scheduling.automaticRestart = true) ``` If you want to use a regular expression, use the `eq` (equal) or `ne` (not equal) operator against a single un-parenthesized expression with or without quotes or against multiple parenthesized expressions. Examples: `fieldname eq unquoted literal` `fieldname eq 'single quoted literal'` `fieldname eq \"double quoted literal\"` `(fieldname1 eq literal) (fieldname2 ne \"literal\")` The literal value is interpreted as a regular expression using Google RE2 library syntax. The literal value must match the entire field. For example, to filter for instances that do not end with name \"instance\", you would use `name ne .*instance`. You cannot combine constraints on multiple fields using regular expressions.", // "location": "query", // "type": "string" // }, @@ -7051,22 +7051,21 @@ func (r *OperationsService) List(project string) *OperationsListCall { // filters resources listed in the response. Most Compute resources // support two types of filter expressions: expressions that support // regular expressions and expressions that follow API improvement -// proposal AIP-160. If you want to use AIP-160, your expression must -// specify the field name, an operator, and the value that you want to -// use for filtering. The value must be a string, a number, or a +// proposal AIP-160. These two types of filter expressions cannot be +// mixed in one request. If you want to use AIP-160, your expression +// must specify the field name, an operator, and the value that you want +// to use for filtering. The value must be a string, a number, or a // boolean. The operator must be either `=`, `!=`, `>`, `<`, `<=`, `>=` // or `:`. For example, if you are filtering Compute Engine instances, // you can exclude instances named `example-instance` by specifying -// `name != example-instance`. The `:` operator can be used with string -// fields to match substrings. For non-string fields it is equivalent to -// the `=` operator. The `:*` comparison can be used to test whether a -// key has been defined. For example, to find all objects with `owner` -// label use: ``` labels.owner:* ``` You can also filter nested fields. -// For example, you could specify `scheduling.automaticRestart = false` -// to include instances only if they are not scheduled for automatic -// restarts. You can use filtering on nested fields to filter based on -// resource labels. To filter on multiple expressions, provide each -// separate expression within parentheses. For example: ``` +// `name != example-instance`. The `:*` comparison can be used to test +// whether a key has been defined. For example, to find all objects with +// `owner` label use: ``` labels.owner:* ``` You can also filter nested +// fields. For example, you could specify `scheduling.automaticRestart = +// false` to include instances only if they are not scheduled for +// automatic restarts. You can use filtering on nested fields to filter +// based on resource labels. To filter on multiple expressions, provide +// each separate expression within parentheses. For example: ``` // (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") // ``` By default, each expression is an `AND` expression. However, you // can include `AND` and `OR` expressions explicitly. For example: ``` @@ -7081,7 +7080,8 @@ func (r *OperationsService) List(project string) *OperationsListCall { // regular expression using Google RE2 library syntax. The literal value // must match the entire field. For example, to filter for instances // that do not end with name "instance", you would use `name ne -// .*instance`. +// .*instance`. You cannot combine constraints on multiple fields using +// regular expressions. func (c *OperationsListCall) Filter(filter string) *OperationsListCall { c.urlParams_.Set("filter", filter) return c @@ -7228,7 +7228,7 @@ func (c *OperationsListCall) Do(opts ...googleapi.CallOption) (*OperationsListRe // ], // "parameters": { // "filter": { - // "description": "A filter expression that filters resources listed in the response. Most Compute resources support two types of filter expressions: expressions that support regular expressions and expressions that follow API improvement proposal AIP-160. If you want to use AIP-160, your expression must specify the field name, an operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The operator must be either `=`, `!=`, `\u003e`, `\u003c`, `\u003c=`, `\u003e=` or `:`. For example, if you are filtering Compute Engine instances, you can exclude instances named `example-instance` by specifying `name != example-instance`. The `:` operator can be used with string fields to match substrings. For non-string fields it is equivalent to the `=` operator. The `:*` comparison can be used to test whether a key has been defined. For example, to find all objects with `owner` label use: ``` labels.owner:* ``` You can also filter nested fields. For example, you could specify `scheduling.automaticRestart = false` to include instances only if they are not scheduled for automatic restarts. You can use filtering on nested fields to filter based on resource labels. To filter on multiple expressions, provide each separate expression within parentheses. For example: ``` (scheduling.automaticRestart = true) (cpuPlatform = \"Intel Skylake\") ``` By default, each expression is an `AND` expression. However, you can include `AND` and `OR` expressions explicitly. For example: ``` (cpuPlatform = \"Intel Skylake\") OR (cpuPlatform = \"Intel Broadwell\") AND (scheduling.automaticRestart = true) ``` If you want to use a regular expression, use the `eq` (equal) or `ne` (not equal) operator against a single un-parenthesized expression with or without quotes or against multiple parenthesized expressions. Examples: `fieldname eq unquoted literal` `fieldname eq 'single quoted literal'` `fieldname eq \"double quoted literal\"` `(fieldname1 eq literal) (fieldname2 ne \"literal\")` The literal value is interpreted as a regular expression using Google RE2 library syntax. The literal value must match the entire field. For example, to filter for instances that do not end with name \"instance\", you would use `name ne .*instance`.", + // "description": "A filter expression that filters resources listed in the response. Most Compute resources support two types of filter expressions: expressions that support regular expressions and expressions that follow API improvement proposal AIP-160. These two types of filter expressions cannot be mixed in one request. If you want to use AIP-160, your expression must specify the field name, an operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The operator must be either `=`, `!=`, `\u003e`, `\u003c`, `\u003c=`, `\u003e=` or `:`. For example, if you are filtering Compute Engine instances, you can exclude instances named `example-instance` by specifying `name != example-instance`. The `:*` comparison can be used to test whether a key has been defined. For example, to find all objects with `owner` label use: ``` labels.owner:* ``` You can also filter nested fields. For example, you could specify `scheduling.automaticRestart = false` to include instances only if they are not scheduled for automatic restarts. You can use filtering on nested fields to filter based on resource labels. To filter on multiple expressions, provide each separate expression within parentheses. For example: ``` (scheduling.automaticRestart = true) (cpuPlatform = \"Intel Skylake\") ``` By default, each expression is an `AND` expression. However, you can include `AND` and `OR` expressions explicitly. For example: ``` (cpuPlatform = \"Intel Skylake\") OR (cpuPlatform = \"Intel Broadwell\") AND (scheduling.automaticRestart = true) ``` If you want to use a regular expression, use the `eq` (equal) or `ne` (not equal) operator against a single un-parenthesized expression with or without quotes or against multiple parenthesized expressions. Examples: `fieldname eq unquoted literal` `fieldname eq 'single quoted literal'` `fieldname eq \"double quoted literal\"` `(fieldname1 eq literal) (fieldname2 ne \"literal\")` The literal value is interpreted as a regular expression using Google RE2 library syntax. The literal value must match the entire field. For example, to filter for instances that do not end with name \"instance\", you would use `name ne .*instance`. You cannot combine constraints on multiple fields using regular expressions.", // "location": "query", // "type": "string" // }, @@ -7492,22 +7492,21 @@ func (r *ResourcesService) List(project string, deployment string) *ResourcesLis // filters resources listed in the response. Most Compute resources // support two types of filter expressions: expressions that support // regular expressions and expressions that follow API improvement -// proposal AIP-160. If you want to use AIP-160, your expression must -// specify the field name, an operator, and the value that you want to -// use for filtering. The value must be a string, a number, or a +// proposal AIP-160. These two types of filter expressions cannot be +// mixed in one request. If you want to use AIP-160, your expression +// must specify the field name, an operator, and the value that you want +// to use for filtering. The value must be a string, a number, or a // boolean. The operator must be either `=`, `!=`, `>`, `<`, `<=`, `>=` // or `:`. For example, if you are filtering Compute Engine instances, // you can exclude instances named `example-instance` by specifying -// `name != example-instance`. The `:` operator can be used with string -// fields to match substrings. For non-string fields it is equivalent to -// the `=` operator. The `:*` comparison can be used to test whether a -// key has been defined. For example, to find all objects with `owner` -// label use: ``` labels.owner:* ``` You can also filter nested fields. -// For example, you could specify `scheduling.automaticRestart = false` -// to include instances only if they are not scheduled for automatic -// restarts. You can use filtering on nested fields to filter based on -// resource labels. To filter on multiple expressions, provide each -// separate expression within parentheses. For example: ``` +// `name != example-instance`. The `:*` comparison can be used to test +// whether a key has been defined. For example, to find all objects with +// `owner` label use: ``` labels.owner:* ``` You can also filter nested +// fields. For example, you could specify `scheduling.automaticRestart = +// false` to include instances only if they are not scheduled for +// automatic restarts. You can use filtering on nested fields to filter +// based on resource labels. To filter on multiple expressions, provide +// each separate expression within parentheses. For example: ``` // (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") // ``` By default, each expression is an `AND` expression. However, you // can include `AND` and `OR` expressions explicitly. For example: ``` @@ -7522,7 +7521,8 @@ func (r *ResourcesService) List(project string, deployment string) *ResourcesLis // regular expression using Google RE2 library syntax. The literal value // must match the entire field. For example, to filter for instances // that do not end with name "instance", you would use `name ne -// .*instance`. +// .*instance`. You cannot combine constraints on multiple fields using +// regular expressions. func (c *ResourcesListCall) Filter(filter string) *ResourcesListCall { c.urlParams_.Set("filter", filter) return c @@ -7678,7 +7678,7 @@ func (c *ResourcesListCall) Do(opts ...googleapi.CallOption) (*ResourcesListResp // "type": "string" // }, // "filter": { - // "description": "A filter expression that filters resources listed in the response. Most Compute resources support two types of filter expressions: expressions that support regular expressions and expressions that follow API improvement proposal AIP-160. If you want to use AIP-160, your expression must specify the field name, an operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The operator must be either `=`, `!=`, `\u003e`, `\u003c`, `\u003c=`, `\u003e=` or `:`. For example, if you are filtering Compute Engine instances, you can exclude instances named `example-instance` by specifying `name != example-instance`. The `:` operator can be used with string fields to match substrings. For non-string fields it is equivalent to the `=` operator. The `:*` comparison can be used to test whether a key has been defined. For example, to find all objects with `owner` label use: ``` labels.owner:* ``` You can also filter nested fields. For example, you could specify `scheduling.automaticRestart = false` to include instances only if they are not scheduled for automatic restarts. You can use filtering on nested fields to filter based on resource labels. To filter on multiple expressions, provide each separate expression within parentheses. For example: ``` (scheduling.automaticRestart = true) (cpuPlatform = \"Intel Skylake\") ``` By default, each expression is an `AND` expression. However, you can include `AND` and `OR` expressions explicitly. For example: ``` (cpuPlatform = \"Intel Skylake\") OR (cpuPlatform = \"Intel Broadwell\") AND (scheduling.automaticRestart = true) ``` If you want to use a regular expression, use the `eq` (equal) or `ne` (not equal) operator against a single un-parenthesized expression with or without quotes or against multiple parenthesized expressions. Examples: `fieldname eq unquoted literal` `fieldname eq 'single quoted literal'` `fieldname eq \"double quoted literal\"` `(fieldname1 eq literal) (fieldname2 ne \"literal\")` The literal value is interpreted as a regular expression using Google RE2 library syntax. The literal value must match the entire field. For example, to filter for instances that do not end with name \"instance\", you would use `name ne .*instance`.", + // "description": "A filter expression that filters resources listed in the response. Most Compute resources support two types of filter expressions: expressions that support regular expressions and expressions that follow API improvement proposal AIP-160. These two types of filter expressions cannot be mixed in one request. If you want to use AIP-160, your expression must specify the field name, an operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The operator must be either `=`, `!=`, `\u003e`, `\u003c`, `\u003c=`, `\u003e=` or `:`. For example, if you are filtering Compute Engine instances, you can exclude instances named `example-instance` by specifying `name != example-instance`. The `:*` comparison can be used to test whether a key has been defined. For example, to find all objects with `owner` label use: ``` labels.owner:* ``` You can also filter nested fields. For example, you could specify `scheduling.automaticRestart = false` to include instances only if they are not scheduled for automatic restarts. You can use filtering on nested fields to filter based on resource labels. To filter on multiple expressions, provide each separate expression within parentheses. For example: ``` (scheduling.automaticRestart = true) (cpuPlatform = \"Intel Skylake\") ``` By default, each expression is an `AND` expression. However, you can include `AND` and `OR` expressions explicitly. For example: ``` (cpuPlatform = \"Intel Skylake\") OR (cpuPlatform = \"Intel Broadwell\") AND (scheduling.automaticRestart = true) ``` If you want to use a regular expression, use the `eq` (equal) or `ne` (not equal) operator against a single un-parenthesized expression with or without quotes or against multiple parenthesized expressions. Examples: `fieldname eq unquoted literal` `fieldname eq 'single quoted literal'` `fieldname eq \"double quoted literal\"` `(fieldname1 eq literal) (fieldname2 ne \"literal\")` The literal value is interpreted as a regular expression using Google RE2 library syntax. The literal value must match the entire field. For example, to filter for instances that do not end with name \"instance\", you would use `name ne .*instance`. You cannot combine constraints on multiple fields using regular expressions.", // "location": "query", // "type": "string" // }, @@ -8388,22 +8388,21 @@ func (r *TypeProvidersService) List(project string) *TypeProvidersListCall { // filters resources listed in the response. Most Compute resources // support two types of filter expressions: expressions that support // regular expressions and expressions that follow API improvement -// proposal AIP-160. If you want to use AIP-160, your expression must -// specify the field name, an operator, and the value that you want to -// use for filtering. The value must be a string, a number, or a +// proposal AIP-160. These two types of filter expressions cannot be +// mixed in one request. If you want to use AIP-160, your expression +// must specify the field name, an operator, and the value that you want +// to use for filtering. The value must be a string, a number, or a // boolean. The operator must be either `=`, `!=`, `>`, `<`, `<=`, `>=` // or `:`. For example, if you are filtering Compute Engine instances, // you can exclude instances named `example-instance` by specifying -// `name != example-instance`. The `:` operator can be used with string -// fields to match substrings. For non-string fields it is equivalent to -// the `=` operator. The `:*` comparison can be used to test whether a -// key has been defined. For example, to find all objects with `owner` -// label use: ``` labels.owner:* ``` You can also filter nested fields. -// For example, you could specify `scheduling.automaticRestart = false` -// to include instances only if they are not scheduled for automatic -// restarts. You can use filtering on nested fields to filter based on -// resource labels. To filter on multiple expressions, provide each -// separate expression within parentheses. For example: ``` +// `name != example-instance`. The `:*` comparison can be used to test +// whether a key has been defined. For example, to find all objects with +// `owner` label use: ``` labels.owner:* ``` You can also filter nested +// fields. For example, you could specify `scheduling.automaticRestart = +// false` to include instances only if they are not scheduled for +// automatic restarts. You can use filtering on nested fields to filter +// based on resource labels. To filter on multiple expressions, provide +// each separate expression within parentheses. For example: ``` // (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") // ``` By default, each expression is an `AND` expression. However, you // can include `AND` and `OR` expressions explicitly. For example: ``` @@ -8418,7 +8417,8 @@ func (r *TypeProvidersService) List(project string) *TypeProvidersListCall { // regular expression using Google RE2 library syntax. The literal value // must match the entire field. For example, to filter for instances // that do not end with name "instance", you would use `name ne -// .*instance`. +// .*instance`. You cannot combine constraints on multiple fields using +// regular expressions. func (c *TypeProvidersListCall) Filter(filter string) *TypeProvidersListCall { c.urlParams_.Set("filter", filter) return c @@ -8565,7 +8565,7 @@ func (c *TypeProvidersListCall) Do(opts ...googleapi.CallOption) (*TypeProviders // ], // "parameters": { // "filter": { - // "description": "A filter expression that filters resources listed in the response. Most Compute resources support two types of filter expressions: expressions that support regular expressions and expressions that follow API improvement proposal AIP-160. If you want to use AIP-160, your expression must specify the field name, an operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The operator must be either `=`, `!=`, `\u003e`, `\u003c`, `\u003c=`, `\u003e=` or `:`. For example, if you are filtering Compute Engine instances, you can exclude instances named `example-instance` by specifying `name != example-instance`. The `:` operator can be used with string fields to match substrings. For non-string fields it is equivalent to the `=` operator. The `:*` comparison can be used to test whether a key has been defined. For example, to find all objects with `owner` label use: ``` labels.owner:* ``` You can also filter nested fields. For example, you could specify `scheduling.automaticRestart = false` to include instances only if they are not scheduled for automatic restarts. You can use filtering on nested fields to filter based on resource labels. To filter on multiple expressions, provide each separate expression within parentheses. For example: ``` (scheduling.automaticRestart = true) (cpuPlatform = \"Intel Skylake\") ``` By default, each expression is an `AND` expression. However, you can include `AND` and `OR` expressions explicitly. For example: ``` (cpuPlatform = \"Intel Skylake\") OR (cpuPlatform = \"Intel Broadwell\") AND (scheduling.automaticRestart = true) ``` If you want to use a regular expression, use the `eq` (equal) or `ne` (not equal) operator against a single un-parenthesized expression with or without quotes or against multiple parenthesized expressions. Examples: `fieldname eq unquoted literal` `fieldname eq 'single quoted literal'` `fieldname eq \"double quoted literal\"` `(fieldname1 eq literal) (fieldname2 ne \"literal\")` The literal value is interpreted as a regular expression using Google RE2 library syntax. The literal value must match the entire field. For example, to filter for instances that do not end with name \"instance\", you would use `name ne .*instance`.", + // "description": "A filter expression that filters resources listed in the response. Most Compute resources support two types of filter expressions: expressions that support regular expressions and expressions that follow API improvement proposal AIP-160. These two types of filter expressions cannot be mixed in one request. If you want to use AIP-160, your expression must specify the field name, an operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The operator must be either `=`, `!=`, `\u003e`, `\u003c`, `\u003c=`, `\u003e=` or `:`. For example, if you are filtering Compute Engine instances, you can exclude instances named `example-instance` by specifying `name != example-instance`. The `:*` comparison can be used to test whether a key has been defined. For example, to find all objects with `owner` label use: ``` labels.owner:* ``` You can also filter nested fields. For example, you could specify `scheduling.automaticRestart = false` to include instances only if they are not scheduled for automatic restarts. You can use filtering on nested fields to filter based on resource labels. To filter on multiple expressions, provide each separate expression within parentheses. For example: ``` (scheduling.automaticRestart = true) (cpuPlatform = \"Intel Skylake\") ``` By default, each expression is an `AND` expression. However, you can include `AND` and `OR` expressions explicitly. For example: ``` (cpuPlatform = \"Intel Skylake\") OR (cpuPlatform = \"Intel Broadwell\") AND (scheduling.automaticRestart = true) ``` If you want to use a regular expression, use the `eq` (equal) or `ne` (not equal) operator against a single un-parenthesized expression with or without quotes or against multiple parenthesized expressions. Examples: `fieldname eq unquoted literal` `fieldname eq 'single quoted literal'` `fieldname eq \"double quoted literal\"` `(fieldname1 eq literal) (fieldname2 ne \"literal\")` The literal value is interpreted as a regular expression using Google RE2 library syntax. The literal value must match the entire field. For example, to filter for instances that do not end with name \"instance\", you would use `name ne .*instance`. You cannot combine constraints on multiple fields using regular expressions.", // "location": "query", // "type": "string" // }, @@ -8657,22 +8657,21 @@ func (r *TypeProvidersService) ListTypes(project string, typeProvider string) *T // filters resources listed in the response. Most Compute resources // support two types of filter expressions: expressions that support // regular expressions and expressions that follow API improvement -// proposal AIP-160. If you want to use AIP-160, your expression must -// specify the field name, an operator, and the value that you want to -// use for filtering. The value must be a string, a number, or a +// proposal AIP-160. These two types of filter expressions cannot be +// mixed in one request. If you want to use AIP-160, your expression +// must specify the field name, an operator, and the value that you want +// to use for filtering. The value must be a string, a number, or a // boolean. The operator must be either `=`, `!=`, `>`, `<`, `<=`, `>=` // or `:`. For example, if you are filtering Compute Engine instances, // you can exclude instances named `example-instance` by specifying -// `name != example-instance`. The `:` operator can be used with string -// fields to match substrings. For non-string fields it is equivalent to -// the `=` operator. The `:*` comparison can be used to test whether a -// key has been defined. For example, to find all objects with `owner` -// label use: ``` labels.owner:* ``` You can also filter nested fields. -// For example, you could specify `scheduling.automaticRestart = false` -// to include instances only if they are not scheduled for automatic -// restarts. You can use filtering on nested fields to filter based on -// resource labels. To filter on multiple expressions, provide each -// separate expression within parentheses. For example: ``` +// `name != example-instance`. The `:*` comparison can be used to test +// whether a key has been defined. For example, to find all objects with +// `owner` label use: ``` labels.owner:* ``` You can also filter nested +// fields. For example, you could specify `scheduling.automaticRestart = +// false` to include instances only if they are not scheduled for +// automatic restarts. You can use filtering on nested fields to filter +// based on resource labels. To filter on multiple expressions, provide +// each separate expression within parentheses. For example: ``` // (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") // ``` By default, each expression is an `AND` expression. However, you // can include `AND` and `OR` expressions explicitly. For example: ``` @@ -8687,7 +8686,8 @@ func (r *TypeProvidersService) ListTypes(project string, typeProvider string) *T // regular expression using Google RE2 library syntax. The literal value // must match the entire field. For example, to filter for instances // that do not end with name "instance", you would use `name ne -// .*instance`. +// .*instance`. You cannot combine constraints on multiple fields using +// regular expressions. func (c *TypeProvidersListTypesCall) Filter(filter string) *TypeProvidersListTypesCall { c.urlParams_.Set("filter", filter) return c @@ -8836,7 +8836,7 @@ func (c *TypeProvidersListTypesCall) Do(opts ...googleapi.CallOption) (*TypeProv // ], // "parameters": { // "filter": { - // "description": "A filter expression that filters resources listed in the response. Most Compute resources support two types of filter expressions: expressions that support regular expressions and expressions that follow API improvement proposal AIP-160. If you want to use AIP-160, your expression must specify the field name, an operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The operator must be either `=`, `!=`, `\u003e`, `\u003c`, `\u003c=`, `\u003e=` or `:`. For example, if you are filtering Compute Engine instances, you can exclude instances named `example-instance` by specifying `name != example-instance`. The `:` operator can be used with string fields to match substrings. For non-string fields it is equivalent to the `=` operator. The `:*` comparison can be used to test whether a key has been defined. For example, to find all objects with `owner` label use: ``` labels.owner:* ``` You can also filter nested fields. For example, you could specify `scheduling.automaticRestart = false` to include instances only if they are not scheduled for automatic restarts. You can use filtering on nested fields to filter based on resource labels. To filter on multiple expressions, provide each separate expression within parentheses. For example: ``` (scheduling.automaticRestart = true) (cpuPlatform = \"Intel Skylake\") ``` By default, each expression is an `AND` expression. However, you can include `AND` and `OR` expressions explicitly. For example: ``` (cpuPlatform = \"Intel Skylake\") OR (cpuPlatform = \"Intel Broadwell\") AND (scheduling.automaticRestart = true) ``` If you want to use a regular expression, use the `eq` (equal) or `ne` (not equal) operator against a single un-parenthesized expression with or without quotes or against multiple parenthesized expressions. Examples: `fieldname eq unquoted literal` `fieldname eq 'single quoted literal'` `fieldname eq \"double quoted literal\"` `(fieldname1 eq literal) (fieldname2 ne \"literal\")` The literal value is interpreted as a regular expression using Google RE2 library syntax. The literal value must match the entire field. For example, to filter for instances that do not end with name \"instance\", you would use `name ne .*instance`.", + // "description": "A filter expression that filters resources listed in the response. Most Compute resources support two types of filter expressions: expressions that support regular expressions and expressions that follow API improvement proposal AIP-160. These two types of filter expressions cannot be mixed in one request. If you want to use AIP-160, your expression must specify the field name, an operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The operator must be either `=`, `!=`, `\u003e`, `\u003c`, `\u003c=`, `\u003e=` or `:`. For example, if you are filtering Compute Engine instances, you can exclude instances named `example-instance` by specifying `name != example-instance`. The `:*` comparison can be used to test whether a key has been defined. For example, to find all objects with `owner` label use: ``` labels.owner:* ``` You can also filter nested fields. For example, you could specify `scheduling.automaticRestart = false` to include instances only if they are not scheduled for automatic restarts. You can use filtering on nested fields to filter based on resource labels. To filter on multiple expressions, provide each separate expression within parentheses. For example: ``` (scheduling.automaticRestart = true) (cpuPlatform = \"Intel Skylake\") ``` By default, each expression is an `AND` expression. However, you can include `AND` and `OR` expressions explicitly. For example: ``` (cpuPlatform = \"Intel Skylake\") OR (cpuPlatform = \"Intel Broadwell\") AND (scheduling.automaticRestart = true) ``` If you want to use a regular expression, use the `eq` (equal) or `ne` (not equal) operator against a single un-parenthesized expression with or without quotes or against multiple parenthesized expressions. Examples: `fieldname eq unquoted literal` `fieldname eq 'single quoted literal'` `fieldname eq \"double quoted literal\"` `(fieldname1 eq literal) (fieldname2 ne \"literal\")` The literal value is interpreted as a regular expression using Google RE2 library syntax. The literal value must match the entire field. For example, to filter for instances that do not end with name \"instance\", you would use `name ne .*instance`. You cannot combine constraints on multiple fields using regular expressions.", // "location": "query", // "type": "string" // }, @@ -9242,22 +9242,21 @@ func (r *TypesService) List(project string) *TypesListCall { // filters resources listed in the response. Most Compute resources // support two types of filter expressions: expressions that support // regular expressions and expressions that follow API improvement -// proposal AIP-160. If you want to use AIP-160, your expression must -// specify the field name, an operator, and the value that you want to -// use for filtering. The value must be a string, a number, or a +// proposal AIP-160. These two types of filter expressions cannot be +// mixed in one request. If you want to use AIP-160, your expression +// must specify the field name, an operator, and the value that you want +// to use for filtering. The value must be a string, a number, or a // boolean. The operator must be either `=`, `!=`, `>`, `<`, `<=`, `>=` // or `:`. For example, if you are filtering Compute Engine instances, // you can exclude instances named `example-instance` by specifying -// `name != example-instance`. The `:` operator can be used with string -// fields to match substrings. For non-string fields it is equivalent to -// the `=` operator. The `:*` comparison can be used to test whether a -// key has been defined. For example, to find all objects with `owner` -// label use: ``` labels.owner:* ``` You can also filter nested fields. -// For example, you could specify `scheduling.automaticRestart = false` -// to include instances only if they are not scheduled for automatic -// restarts. You can use filtering on nested fields to filter based on -// resource labels. To filter on multiple expressions, provide each -// separate expression within parentheses. For example: ``` +// `name != example-instance`. The `:*` comparison can be used to test +// whether a key has been defined. For example, to find all objects with +// `owner` label use: ``` labels.owner:* ``` You can also filter nested +// fields. For example, you could specify `scheduling.automaticRestart = +// false` to include instances only if they are not scheduled for +// automatic restarts. You can use filtering on nested fields to filter +// based on resource labels. To filter on multiple expressions, provide +// each separate expression within parentheses. For example: ``` // (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") // ``` By default, each expression is an `AND` expression. However, you // can include `AND` and `OR` expressions explicitly. For example: ``` @@ -9272,7 +9271,8 @@ func (r *TypesService) List(project string) *TypesListCall { // regular expression using Google RE2 library syntax. The literal value // must match the entire field. For example, to filter for instances // that do not end with name "instance", you would use `name ne -// .*instance`. +// .*instance`. You cannot combine constraints on multiple fields using +// regular expressions. func (c *TypesListCall) Filter(filter string) *TypesListCall { c.urlParams_.Set("filter", filter) return c @@ -9419,7 +9419,7 @@ func (c *TypesListCall) Do(opts ...googleapi.CallOption) (*TypesListResponse, er // ], // "parameters": { // "filter": { - // "description": "A filter expression that filters resources listed in the response. Most Compute resources support two types of filter expressions: expressions that support regular expressions and expressions that follow API improvement proposal AIP-160. If you want to use AIP-160, your expression must specify the field name, an operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The operator must be either `=`, `!=`, `\u003e`, `\u003c`, `\u003c=`, `\u003e=` or `:`. For example, if you are filtering Compute Engine instances, you can exclude instances named `example-instance` by specifying `name != example-instance`. The `:` operator can be used with string fields to match substrings. For non-string fields it is equivalent to the `=` operator. The `:*` comparison can be used to test whether a key has been defined. For example, to find all objects with `owner` label use: ``` labels.owner:* ``` You can also filter nested fields. For example, you could specify `scheduling.automaticRestart = false` to include instances only if they are not scheduled for automatic restarts. You can use filtering on nested fields to filter based on resource labels. To filter on multiple expressions, provide each separate expression within parentheses. For example: ``` (scheduling.automaticRestart = true) (cpuPlatform = \"Intel Skylake\") ``` By default, each expression is an `AND` expression. However, you can include `AND` and `OR` expressions explicitly. For example: ``` (cpuPlatform = \"Intel Skylake\") OR (cpuPlatform = \"Intel Broadwell\") AND (scheduling.automaticRestart = true) ``` If you want to use a regular expression, use the `eq` (equal) or `ne` (not equal) operator against a single un-parenthesized expression with or without quotes or against multiple parenthesized expressions. Examples: `fieldname eq unquoted literal` `fieldname eq 'single quoted literal'` `fieldname eq \"double quoted literal\"` `(fieldname1 eq literal) (fieldname2 ne \"literal\")` The literal value is interpreted as a regular expression using Google RE2 library syntax. The literal value must match the entire field. For example, to filter for instances that do not end with name \"instance\", you would use `name ne .*instance`.", + // "description": "A filter expression that filters resources listed in the response. Most Compute resources support two types of filter expressions: expressions that support regular expressions and expressions that follow API improvement proposal AIP-160. These two types of filter expressions cannot be mixed in one request. If you want to use AIP-160, your expression must specify the field name, an operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The operator must be either `=`, `!=`, `\u003e`, `\u003c`, `\u003c=`, `\u003e=` or `:`. For example, if you are filtering Compute Engine instances, you can exclude instances named `example-instance` by specifying `name != example-instance`. The `:*` comparison can be used to test whether a key has been defined. For example, to find all objects with `owner` label use: ``` labels.owner:* ``` You can also filter nested fields. For example, you could specify `scheduling.automaticRestart = false` to include instances only if they are not scheduled for automatic restarts. You can use filtering on nested fields to filter based on resource labels. To filter on multiple expressions, provide each separate expression within parentheses. For example: ``` (scheduling.automaticRestart = true) (cpuPlatform = \"Intel Skylake\") ``` By default, each expression is an `AND` expression. However, you can include `AND` and `OR` expressions explicitly. For example: ``` (cpuPlatform = \"Intel Skylake\") OR (cpuPlatform = \"Intel Broadwell\") AND (scheduling.automaticRestart = true) ``` If you want to use a regular expression, use the `eq` (equal) or `ne` (not equal) operator against a single un-parenthesized expression with or without quotes or against multiple parenthesized expressions. Examples: `fieldname eq unquoted literal` `fieldname eq 'single quoted literal'` `fieldname eq \"double quoted literal\"` `(fieldname1 eq literal) (fieldname2 ne \"literal\")` The literal value is interpreted as a regular expression using Google RE2 library syntax. The literal value must match the entire field. For example, to filter for instances that do not end with name \"instance\", you would use `name ne .*instance`. You cannot combine constraints on multiple fields using regular expressions.", // "location": "query", // "type": "string" // }, diff --git a/go.work.sum b/go.work.sum index 42316737f49..dac13bc61d4 100644 --- a/go.work.sum +++ b/go.work.sum @@ -2,6 +2,7 @@ cloud.google.com/go v0.110.0 h1:Zc8gqp3+a9/Eyph2KDmcGaPtbKRIoqq4YTlL4NMD0Ys= cloud.google.com/go v0.110.2 h1:sdFPBr6xG9/wkBbfhmUz/JmZC7X6LavQgcrVINrKiVA= cloud.google.com/go v0.110.4 h1:1JYyxKMN9hd5dR2MYTPWkGUgcoxVVhg0LKNKEo0qvmk= cloud.google.com/go v0.110.6 h1:8uYAkj3YHTP/1iwReuHPxLSbdcyc+dSBbzFMrVwDR6Q= +cloud.google.com/go v0.110.7 h1:rJyC7nWRg2jWGZ4wSJ5nY65GTdYJkg0cd/uXb+ACI6o= golang.org/x/mod v0.8.0/go.mod h1:iBbtSCu2XBx23ZKBPSOrRkjjQPZFPuis4dIYUhu/chs= golang.org/x/net v0.8.0/go.mod h1:QVkue5JL9kW//ek3r6jTKnTFis1tRmNAW2P1shuFdJc= golang.org/x/net v0.10.0/go.mod h1:0qNGK6F8kojg2nk9dLZ2mShWaEBan6FAoqfSigmmuDg= diff --git a/paymentsresellersubscription/v1/paymentsresellersubscription-api.json b/paymentsresellersubscription/v1/paymentsresellersubscription-api.json index 4be34e53e84..7971651b46b 100644 --- a/paymentsresellersubscription/v1/paymentsresellersubscription-api.json +++ b/paymentsresellersubscription/v1/paymentsresellersubscription-api.json @@ -396,7 +396,7 @@ } } }, - "revision": "20230917", + "revision": "20230924", "rootUrl": "https://paymentsresellersubscription.googleapis.com/", "schemas": { "GoogleCloudPaymentsResellerSubscriptionV1Amount": { @@ -494,7 +494,34 @@ "GoogleCloudPaymentsResellerSubscriptionV1EntitleSubscriptionRequest": { "description": "Partner request for entitling the previously provisioned subscription to an end user. The end user identity is inferred from the request OAuth context.", "id": "GoogleCloudPaymentsResellerSubscriptionV1EntitleSubscriptionRequest", - "properties": {}, + "properties": { + "lineItemEntitlementDetails": { + "description": "Optional. The line items to be entitled. If unspecified, all line items will be entitled.", + "items": { + "$ref": "GoogleCloudPaymentsResellerSubscriptionV1EntitleSubscriptionRequestLineItemEntitlementDetails" + }, + "type": "array" + } + }, + "type": "object" + }, + "GoogleCloudPaymentsResellerSubscriptionV1EntitleSubscriptionRequestLineItemEntitlementDetails": { + "description": "The details of the line item to be entitled.", + "id": "GoogleCloudPaymentsResellerSubscriptionV1EntitleSubscriptionRequestLineItemEntitlementDetails", + "properties": { + "lineItemIndex": { + "description": "Required. The index of the line item to be entitled.", + "format": "int32", + "type": "integer" + }, + "products": { + "description": "Optional. Only applicable if the line item corresponds to a hard bundle. Product resource names that identify the bundle elements to be entitled in the line item. If unspecified, all bundle elements will be entitled. The format is 'partners/{partner_id}/products/{product_id}'.", + "items": { + "type": "string" + }, + "type": "array" + } + }, "type": "object" }, "GoogleCloudPaymentsResellerSubscriptionV1EntitleSubscriptionResponse": { diff --git a/paymentsresellersubscription/v1/paymentsresellersubscription-gen.go b/paymentsresellersubscription/v1/paymentsresellersubscription-gen.go index 1f915718bd5..871580b920b 100644 --- a/paymentsresellersubscription/v1/paymentsresellersubscription-gen.go +++ b/paymentsresellersubscription/v1/paymentsresellersubscription-gen.go @@ -344,6 +344,69 @@ func (s *GoogleCloudPaymentsResellerSubscriptionV1Duration) MarshalJSON() ([]byt // to an end user. The end user identity is inferred from the request // OAuth context. type GoogleCloudPaymentsResellerSubscriptionV1EntitleSubscriptionRequest struct { + // LineItemEntitlementDetails: Optional. The line items to be entitled. + // If unspecified, all line items will be entitled. + LineItemEntitlementDetails []*GoogleCloudPaymentsResellerSubscriptionV1EntitleSubscriptionRequestLineItemEntitlementDetails `json:"lineItemEntitlementDetails,omitempty"` + + // ForceSendFields is a list of field names (e.g. + // "LineItemEntitlementDetails") 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. + // "LineItemEntitlementDetails") 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 *GoogleCloudPaymentsResellerSubscriptionV1EntitleSubscriptionRequest) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudPaymentsResellerSubscriptionV1EntitleSubscriptionRequest + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// GoogleCloudPaymentsResellerSubscriptionV1EntitleSubscriptionRequestLin +// eItemEntitlementDetails: The details of the line item to be entitled. +type GoogleCloudPaymentsResellerSubscriptionV1EntitleSubscriptionRequestLineItemEntitlementDetails struct { + // LineItemIndex: Required. The index of the line item to be entitled. + LineItemIndex int64 `json:"lineItemIndex,omitempty"` + + // Products: Optional. Only applicable if the line item corresponds to a + // hard bundle. Product resource names that identify the bundle elements + // to be entitled in the line item. If unspecified, all bundle elements + // will be entitled. The format is + // 'partners/{partner_id}/products/{product_id}'. + Products []string `json:"products,omitempty"` + + // ForceSendFields is a list of field names (e.g. "LineItemIndex") 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. "LineItemIndex") 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 *GoogleCloudPaymentsResellerSubscriptionV1EntitleSubscriptionRequestLineItemEntitlementDetails) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudPaymentsResellerSubscriptionV1EntitleSubscriptionRequestLineItemEntitlementDetails + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } type GoogleCloudPaymentsResellerSubscriptionV1EntitleSubscriptionResponse struct { diff --git a/storage/v1/storage-api.json b/storage/v1/storage-api.json index 64831d2df29..0d1aa3ed6d5 100644 --- a/storage/v1/storage-api.json +++ b/storage/v1/storage-api.json @@ -26,7 +26,7 @@ "description": "Stores and retrieves potentially large, immutable data objects.", "discoveryVersion": "v1", "documentationLink": "https://developers.google.com/storage/docs/json_api/", - "etag": "\"3132363038323634353839373135393539313634\"", + "etag": "\"3130343038333638363030353132373033343437\"", "icons": { "x16": "https://www.google.com/images/icons/product/cloud_storage-16.png", "x32": "https://www.google.com/images/icons/product/cloud_storage-32.png" @@ -2373,6 +2373,11 @@ "required": true, "type": "string" }, + "copySourceAcl": { + "description": "If true, copies the source object's ACL; otherwise, uses the bucket's default object ACL. The default is false.", + "location": "query", + "type": "boolean" + }, "generation": { "description": "Selects a specific revision of this object.", "format": "int64", @@ -3258,7 +3263,7 @@ } } }, - "revision": "20230914", + "revision": "20230922", "rootUrl": "https://storage.googleapis.com/", "schemas": { "Bucket": { diff --git a/storage/v1/storage-gen.go b/storage/v1/storage-gen.go index 952d1b3e00f..37a9eb7625c 100644 --- a/storage/v1/storage-gen.go +++ b/storage/v1/storage-gen.go @@ -11395,6 +11395,14 @@ func (r *ObjectsService) Restore(bucket string, object string, object2 *Object) return c } +// CopySourceAcl sets the optional parameter "copySourceAcl": If true, +// copies the source object's ACL; otherwise, uses the bucket's default +// object ACL. The default is false. +func (c *ObjectsRestoreCall) CopySourceAcl(copySourceAcl bool) *ObjectsRestoreCall { + c.urlParams_.Set("copySourceAcl", fmt.Sprint(copySourceAcl)) + return c +} + // IfGenerationMatch sets the optional parameter "ifGenerationMatch": // Makes the operation conditional on whether the object's one live // generation matches the given value. Setting to 0 makes the operation @@ -11556,6 +11564,11 @@ func (c *ObjectsRestoreCall) Do(opts ...googleapi.CallOption) (*Object, error) { // "required": true, // "type": "string" // }, + // "copySourceAcl": { + // "description": "If true, copies the source object's ACL; otherwise, uses the bucket's default object ACL. The default is false.", + // "location": "query", + // "type": "boolean" + // }, // "generation": { // "description": "Selects a specific revision of this object.", // "format": "int64", diff --git a/workflowexecutions/v1/workflowexecutions-api.json b/workflowexecutions/v1/workflowexecutions-api.json index 432624714b2..d451caa2a2b 100644 --- a/workflowexecutions/v1/workflowexecutions-api.json +++ b/workflowexecutions/v1/workflowexecutions-api.json @@ -200,7 +200,7 @@ ] }, "exportData": { - "description": "Returns all metadata stored about an execution, excluding most data that is already accessible via other API methods.", + "description": "Returns all metadata stored about an execution, excluding most data that is already accessible using other API methods.", "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/workflows/{workflowsId}/executions/{executionsId}:exportData", "httpMethod": "GET", "id": "workflowexecutions.projects.locations.workflows.executions.exportData", @@ -209,7 +209,7 @@ ], "parameters": { "name": { - "description": "Required. Name of the execution to be data exported. Format: projects/{project}/locations/{location}/workflows/{workflow}/executions/{execution}", + "description": "Required. Name of the execution for which data is to be exported. Format: projects/{project}/locations/{location}/workflows/{workflow}/executions/{execution}", "location": "path", "pattern": "^projects/[^/]+/locations/[^/]+/workflows/[^/]+/executions/[^/]+$", "required": true, @@ -330,7 +330,7 @@ "callbacks": { "methods": { "list": { - "description": "Returns a list of active callbacks which belong to the execution with the given name. The returned callbacks are ordered by callback ID. first).", + "description": "Returns a list of active callbacks that belong to the execution with the given name. The returned callbacks are ordered by callback ID.", "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/workflows/{workflowsId}/executions/{executionsId}/callbacks", "httpMethod": "GET", "id": "workflowexecutions.projects.locations.workflows.executions.callbacks.list", @@ -376,7 +376,7 @@ } } }, - "revision": "20230829", + "revision": "20230912", "rootUrl": "https://workflowexecutions.googleapis.com/", "schemas": { "Callback": { @@ -392,7 +392,7 @@ "type": "array" }, "method": { - "description": "Output only. The method accepted by the callback. E.g. GET, POST, PUT.", + "description": "Output only. The method accepted by the callback. For example: GET, POST, PUT.", "readOnly": true, "type": "string" }, @@ -545,7 +545,7 @@ "id": "ExportDataResponse", "properties": { "data": { - "description": "The JSON string with customer data and metadata of an execution of the given name", + "description": "The JSON string with customer data and metadata for an execution with the given name", "type": "string" } }, diff --git a/workflowexecutions/v1/workflowexecutions-gen.go b/workflowexecutions/v1/workflowexecutions-gen.go index e6785ff86ff..596a6150fda 100644 --- a/workflowexecutions/v1/workflowexecutions-gen.go +++ b/workflowexecutions/v1/workflowexecutions-gen.go @@ -214,8 +214,8 @@ type Callback struct { // that have not been processed by a waiting execution step. AvailablePayloads []string `json:"availablePayloads,omitempty"` - // Method: Output only. The method accepted by the callback. E.g. GET, - // POST, PUT. + // Method: Output only. The method accepted by the callback. For + // example: GET, POST, PUT. Method string `json:"method,omitempty"` // Name: Output only. The resource name of the callback. Format: @@ -401,8 +401,8 @@ func (s *Execution) MarshalJSON() ([]byte, error) { // ExportDataResponse: Response for the ExportData method. type ExportDataResponse struct { - // Data: The JSON string with customer data and metadata of an execution - // of the given name + // Data: The JSON string with customer data and metadata for an + // execution with the given name Data string `json:"data,omitempty"` // ServerResponse contains the HTTP response code and headers from the @@ -1267,9 +1267,10 @@ type ProjectsLocationsWorkflowsExecutionsExportDataCall struct { } // ExportData: Returns all metadata stored about an execution, excluding -// most data that is already accessible via other API methods. +// most data that is already accessible using other API methods. // -// - name: Name of the execution to be data exported. Format: +// - name: Name of the execution for which data is to be exported. +// Format: // projects/{project}/locations/{location}/workflows/{workflow}/executi // ons/{execution}. func (r *ProjectsLocationsWorkflowsExecutionsService) ExportData(name string) *ProjectsLocationsWorkflowsExecutionsExportDataCall { @@ -1377,7 +1378,7 @@ func (c *ProjectsLocationsWorkflowsExecutionsExportDataCall) Do(opts ...googleap } return ret, nil // { - // "description": "Returns all metadata stored about an execution, excluding most data that is already accessible via other API methods.", + // "description": "Returns all metadata stored about an execution, excluding most data that is already accessible using other API methods.", // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/workflows/{workflowsId}/executions/{executionsId}:exportData", // "httpMethod": "GET", // "id": "workflowexecutions.projects.locations.workflows.executions.exportData", @@ -1386,7 +1387,7 @@ func (c *ProjectsLocationsWorkflowsExecutionsExportDataCall) Do(opts ...googleap // ], // "parameters": { // "name": { - // "description": "Required. Name of the execution to be data exported. Format: projects/{project}/locations/{location}/workflows/{workflow}/executions/{execution}", + // "description": "Required. Name of the execution for which data is to be exported. Format: projects/{project}/locations/{location}/workflows/{workflow}/executions/{execution}", // "location": "path", // "pattern": "^projects/[^/]+/locations/[^/]+/workflows/[^/]+/executions/[^/]+$", // "required": true, @@ -1863,9 +1864,9 @@ type ProjectsLocationsWorkflowsExecutionsCallbacksListCall struct { header_ http.Header } -// List: Returns a list of active callbacks which belong to the -// execution with the given name. The returned callbacks are ordered by -// callback ID. first). +// List: Returns a list of active callbacks that belong to the execution +// with the given name. The returned callbacks are ordered by callback +// ID. // // - parent: Name of the execution for which the callbacks should be // listed. Format: @@ -1994,7 +1995,7 @@ func (c *ProjectsLocationsWorkflowsExecutionsCallbacksListCall) Do(opts ...googl } return ret, nil // { - // "description": "Returns a list of active callbacks which belong to the execution with the given name. The returned callbacks are ordered by callback ID. first).", + // "description": "Returns a list of active callbacks that belong to the execution with the given name. The returned callbacks are ordered by callback ID.", // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/workflows/{workflowsId}/executions/{executionsId}/callbacks", // "httpMethod": "GET", // "id": "workflowexecutions.projects.locations.workflows.executions.callbacks.list",